Allow splitting the terminal panel (#21238)
Closes https://github.com/zed-industries/zed/issues/4351  Applies the same splitting mechanism, as Zed's central pane has, to the terminal panel. Similar navigation, splitting and (de)serialization capabilities are supported. Notable caveats: * zooming keeps the terminal splits' ratio, rather expanding the terminal pane * on macOs, central panel is split with `cmd-k up/down/etc.` but `cmd-k` is a "standard" terminal clearing keybinding on macOS, so terminal panel splitting is done via `ctrl-k up/down/etc.` * task terminals are "split" into regular terminals, and also not persisted (same as currently in the terminal) Seems ok for the initial version, we can revisit and polish things later. Release Notes: - Added the ability to split the terminal panel
This commit is contained in:
parent
4564da2875
commit
d0bafce86b
17 changed files with 953 additions and 348 deletions
|
@ -16,7 +16,7 @@ use settings::Settings;
|
|||
use util::paths::PathExt;
|
||||
use workspace::{
|
||||
item::{BreadcrumbText, Item, ProjectItem, SerializableItem, TabContentParams},
|
||||
ItemId, ItemSettings, Pane, ToolbarItemLocation, Workspace, WorkspaceId,
|
||||
ItemId, ItemSettings, ToolbarItemLocation, Workspace, WorkspaceId,
|
||||
};
|
||||
|
||||
const IMAGE_VIEWER_KIND: &str = "ImageView";
|
||||
|
@ -172,9 +172,9 @@ impl SerializableItem for ImageView {
|
|||
_workspace: WeakView<Workspace>,
|
||||
workspace_id: WorkspaceId,
|
||||
item_id: ItemId,
|
||||
cx: &mut ViewContext<Pane>,
|
||||
cx: &mut WindowContext,
|
||||
) -> Task<gpui::Result<View<Self>>> {
|
||||
cx.spawn(|_pane, mut cx| async move {
|
||||
cx.spawn(|mut cx| async move {
|
||||
let image_path = IMAGE_VIEWER
|
||||
.get_image_path(item_id, workspace_id)?
|
||||
.ok_or_else(|| anyhow::anyhow!("No image path found"))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue