mirror of https://github.com/lapce/lapce.git
focus editor
This commit is contained in:
parent
746f4c4aa3
commit
038e4f9a31
|
@ -141,6 +141,9 @@ pub enum LapceWorkbenchCommand {
|
|||
|
||||
#[strum(serialize = "toggle_maximized_panel")]
|
||||
ToggleMaximizedPanel,
|
||||
|
||||
#[strum(serialize = "focus_editor")]
|
||||
FocusEditor,
|
||||
}
|
||||
|
||||
#[derive(Display, EnumString, EnumIter, Clone, PartialEq, Debug, EnumMessage)]
|
||||
|
|
|
@ -787,6 +787,13 @@ pub fn run_workbench_command(
|
|||
let panel = Arc::make_mut(panel);
|
||||
panel.maximized = !panel.maximized;
|
||||
}
|
||||
LapceWorkbenchCommand::FocusEditor => {
|
||||
ctx.submit_command(Command::new(
|
||||
LAPCE_UI_COMMAND,
|
||||
LapceUICommand::Focus,
|
||||
Target::Widget(*self.main_split.active),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,11 @@ key = "ctrl+."
|
|||
command = "show_code_actions"
|
||||
mode = "n"
|
||||
|
||||
[[keymaps]]
|
||||
key = "meta+k"
|
||||
command = "focus_editor"
|
||||
when = "panel_focus"
|
||||
|
||||
# --------------------------------- Basic editing ---------------------------------------
|
||||
|
||||
[[keymaps]]
|
||||
|
|
Loading…
Reference in New Issue