Rework new terminal actions
This commit is contained in:
parent
e80ab5f096
commit
9c707eff27
4 changed files with 41 additions and 56 deletions
|
@ -3,7 +3,7 @@ mod dragged_item_receiver;
|
|||
use super::{ItemHandle, SplitDirection};
|
||||
use crate::{
|
||||
item::WeakItemHandle, toolbar::Toolbar, AutosaveSetting, Item, NewFile, NewSearch, NewTerminal,
|
||||
ToggleZoom, Workspace, WorkspaceSettings,
|
||||
ToggleZoom, Workspace, WorkspaceSettings, NewCenterTerminal,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use collections::{HashMap, HashSet, VecDeque};
|
||||
|
@ -131,7 +131,6 @@ pub enum Event {
|
|||
pub struct Pane {
|
||||
items: Vec<Box<dyn ItemHandle>>,
|
||||
activation_history: Vec<usize>,
|
||||
is_active: bool,
|
||||
zoomed: bool,
|
||||
active_item_index: usize,
|
||||
last_focused_view_by_item: HashMap<usize, AnyWeakViewHandle>,
|
||||
|
@ -238,7 +237,6 @@ impl Pane {
|
|||
Self {
|
||||
items: Vec::new(),
|
||||
activation_history: Vec::new(),
|
||||
is_active: true,
|
||||
zoomed: false,
|
||||
active_item_index: 0,
|
||||
last_focused_view_by_item: Default::default(),
|
||||
|
@ -996,7 +994,7 @@ impl Pane {
|
|||
AnchorCorner::TopRight,
|
||||
vec![
|
||||
ContextMenuItem::action("New File", NewFile),
|
||||
ContextMenuItem::action("New Terminal", NewTerminal),
|
||||
ContextMenuItem::action("New Terminal", NewCenterTerminal),
|
||||
ContextMenuItem::action("New Search", NewSearch),
|
||||
],
|
||||
cx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue