diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2022-02-09 12:43:36 +0100 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2022-04-16 19:56:26 +0200 |
| commit | 0cf71910336e07ff1bde6cf26e2fd3161f059f07 (patch) | |
| tree | 35ca12112346df74275f7e0a3fe1107b612f45cd /src | |
| parent | 90db664635013f6e857ec696403f2164032410a8 (diff) | |
Make Shift+Space insert a space in insert mode
Terminals that support CSI u escape codes (like iTerm2, Kitty and foot)
allow us to map <s-space> independently of <space>.
Users expect that <s-space> inputs a space character; make it so.
Fixes #4534
Also reported in https://discuss.kakoune.com/t/shift-space-doesnt-send-space-character/2004
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_handler.cc | 2 | ||||
| -rw-r--r-- | src/keys.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index 26d255c0..5aba382d 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -1003,7 +1003,7 @@ public: } else { - if (key == Key::Space and + if ((key == Key::Space or key == shift(Key::Space)) and not (m_completions.flags & Completions::Flags::Quoted) and // if token is quoted, this space does not end it can_auto_insert_completion()) m_line_editor.insert_from(line.char_count_to(m_completions.start), diff --git a/src/keys.cc b/src/keys.cc index 8eb3fce0..e1f3e2c9 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -49,7 +49,7 @@ Optional<Codepoint> Key::codepoint() const return '\n'; if (*this == Key::Tab) return '\t'; - if (*this == Key::Space) + if (*this == Key::Space or *this == shift(Key::Space)) return ' '; if (*this == Key::Escape) return 0x1B; |
