summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2022-02-09 12:43:36 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2022-04-16 19:56:26 +0200
commit0cf71910336e07ff1bde6cf26e2fd3161f059f07 (patch)
tree35ca12112346df74275f7e0a3fe1107b612f45cd /src/input_handler.cc
parent90db664635013f6e857ec696403f2164032410a8 (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/input_handler.cc')
-rw-r--r--src/input_handler.cc2
1 files changed, 1 insertions, 1 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),