mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: support submit completion and input at once by using <Enter> key (#565)
This commit is contained in:
parent
0c0a0f319d
commit
3248dbd8bb
2 changed files with 4 additions and 2 deletions
|
|
@ -258,8 +258,9 @@ keymap = [
|
|||
[completion]
|
||||
|
||||
keymap = [
|
||||
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel completion" },
|
||||
{ on = [ "<Tab>" ], exec = "close --submit", desc = "Submit the completion" },
|
||||
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel completion" },
|
||||
{ on = [ "<Tab>" ], exec = "close --submit", desc = "Submit the completion" },
|
||||
{ on = [ "<Enter>" ], exec = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" },
|
||||
|
||||
{ on = [ "<A-k>" ], exec = "arrow -1", desc = "Move cursor up" },
|
||||
{ on = [ "<A-j>" ], exec = "arrow 1", desc = "Move cursor down" },
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue