diff --git a/yazi-config/preset/keymap.toml b/yazi-config/preset/keymap.toml index 3e2aac05..52021f80 100644 --- a/yazi-config/preset/keymap.toml +++ b/yazi-config/preset/keymap.toml @@ -258,8 +258,9 @@ keymap = [ [completion] keymap = [ - { on = [ "" ], exec = "close", desc = "Cancel completion" }, - { on = [ "" ], exec = "close --submit", desc = "Submit the completion" }, + { on = [ "" ], exec = "close", desc = "Cancel completion" }, + { on = [ "" ], exec = "close --submit", desc = "Submit the completion" }, + { on = [ "" ], exec = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" }, { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, diff --git a/yazi-fm/src/executor.rs b/yazi-fm/src/executor.rs index b05b4881..c643a51f 100644 --- a/yazi-fm/src/executor.rs +++ b/yazi-fm/src/executor.rs @@ -270,6 +270,7 @@ impl<'a> Executor<'a> { #[allow(clippy::single_match)] match exec.cmd.as_str() { "help" => self.app.cx.help.toggle(Layer::Completion), + "close_input" => self.app.cx.input.close(exec), _ => {} } }