diff options
author | Lennard Hofmann | 2022-11-19 17:08:03 +0000 |
---|---|---|
committer | GitHub | 2022-11-19 17:08:03 +0000 |
commit | 0e23e4f882ec840bed0e2c1ef3723deb7a258801 (patch) | |
tree | 17e1ebc5fddfa972e7759eb63ccd2926c5f69c2f | |
parent | 7e99087fa36fd49b350311ebdbc3b9338794746b (diff) |
Make `r<tab>` and `f<tab>` work (#4817)
Previously, commands such as `r<tab>` (replace with tab) or `t<tab>`
(select till tab) had no effect. This is because `KeyCode::Tab` needs
special treatment (like `KeyCode::Enter`).
-rw-r--r-- | helix-term/src/commands.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index b00e02b9..1b0c557e 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1132,6 +1132,10 @@ where } KeyEvent { + code: KeyCode::Tab, .. + } => '\t', + + KeyEvent { code: KeyCode::Char(ch), .. } => ch, @@ -1277,6 +1281,9 @@ fn replace(cx: &mut Context) { code: KeyCode::Enter, .. } => Some(doc.line_ending.as_str()), + KeyEvent { + code: KeyCode::Tab, .. + } => Some("\t"), _ => None, }; |