diff options
author | Aram Drevekenin <aram@poor.dev> | 2021-10-29 15:28:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 15:28:36 +0200 |
commit | 6d47d360e18571d7e60f2fb332a1401799bc2f04 (patch) | |
tree | 0bf54142136d157afaecbcfea11061d3c3bf745c /zellij-utils/src | |
parent | 2ac1454ec005845f1a6fca1ef0eda06e7a8b2233 (diff) |
fix(compatibility): home and end key fix (#815)
* fix(compatibility): handle home/end keys properly from terminfo
* style(fmt): make rustfmt happy
* style(fmt): remove unused import
Diffstat (limited to 'zellij-utils/src')
-rw-r--r-- | zellij-utils/src/input/keybinds.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/zellij-utils/src/input/keybinds.rs b/zellij-utils/src/input/keybinds.rs index 8bef47fde..d3d0c7051 100644 --- a/zellij-utils/src/input/keybinds.rs +++ b/zellij-utils/src/input/keybinds.rs @@ -190,7 +190,7 @@ impl Keybinds { /// [`InputMode`] and [`Keybinds`]. pub fn key_to_actions( key: &Key, - input: Vec<u8>, + raw_bytes: Vec<u8>, mode: &InputMode, keybinds: &Keybinds, ) -> Vec<Action> { @@ -205,8 +205,10 @@ impl Keybinds { .unwrap_or_else(|| vec![action]) }; match *mode { - InputMode::Normal | InputMode::Locked => mode_keybind_or_action(Action::Write(input)), - InputMode::RenameTab => mode_keybind_or_action(Action::TabNameInput(input)), + InputMode::Normal | InputMode::Locked => { + mode_keybind_or_action(Action::Write(raw_bytes)) + } + InputMode::RenameTab => mode_keybind_or_action(Action::TabNameInput(raw_bytes)), _ => mode_keybind_or_action(Action::NoOp), } } |