1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-25 04:24:48 +03:00

Merge remote-tracking branch 'krobelus/support-shift-backspace'

This commit is contained in:
Maxime Coste 2022-07-28 21:23:03 +10:00
commit 935261c8be

View File

@ -469,7 +469,7 @@ public:
m_cursor_pos = 0; m_cursor_pos = 0;
else if (key == Key::End or key == ctrl('e')) else if (key == Key::End or key == ctrl('e'))
m_cursor_pos = m_line.char_length(); m_cursor_pos = m_line.char_length();
else if (key == Key::Backspace or key == ctrl('h')) else if (key == Key::Backspace or key == shift(Key::Backspace) or key == ctrl('h'))
{ {
if (m_cursor_pos != 0) if (m_cursor_pos != 0)
{ {
@ -810,7 +810,7 @@ public:
return; return;
} }
else if (key == Key::Escape or key == ctrl('c') or else if (key == Key::Escape or key == ctrl('c') or
((key == Key::Backspace or key == ctrl('h')) and line.empty())) ((key == Key::Backspace or key == shift(Key::Backspace) or key == ctrl('h')) and line.empty()))
{ {
history_push(line); history_push(line);
context().print_status(DisplayLine{}); context().print_status(DisplayLine{});
@ -1263,7 +1263,7 @@ public:
m_completer.reset(); m_completer.reset();
pop_mode(); pop_mode();
} }
else if (key == Key::Backspace) else if (key == Key::Backspace or key == shift(Key::Backspace))
{ {
Vector<Selection> sels; Vector<Selection> sels;
for (auto& sel : context().selections()) for (auto& sel : context().selections())