mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-22 11:01:48 +03:00
Add support for readline like <c-k> and <c-u> in prompts
This commit is contained in:
parent
4d5a4fb6dd
commit
735b1e1dc5
@ -425,6 +425,13 @@ public:
|
|||||||
to_next_word_end<Word>(m_cursor_pos, m_line);
|
to_next_word_end<Word>(m_cursor_pos, m_line);
|
||||||
else if (key == ctrlalt('e'))
|
else if (key == ctrlalt('e'))
|
||||||
to_next_word_end<WORD>(m_cursor_pos, m_line);
|
to_next_word_end<WORD>(m_cursor_pos, m_line);
|
||||||
|
else if (key == ctrl('k'))
|
||||||
|
m_line = m_line.substr(0_char, m_cursor_pos).str();
|
||||||
|
else if (key == ctrl('u'))
|
||||||
|
{
|
||||||
|
m_line = m_line.substr(m_cursor_pos).str();
|
||||||
|
m_cursor_pos = 0;
|
||||||
|
}
|
||||||
else if (auto cp = key.codepoint())
|
else if (auto cp = key.codepoint())
|
||||||
insert(*cp);
|
insert(*cp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user