mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibLine: Add Ctrl-k shortcut
Only does the 'delete to end of line' bit for now. No yank ring support yet.
This commit is contained in:
parent
c1f633e1ee
commit
f008e83eae
Notes:
sideshowbarker
2024-07-19 04:10:48 +09:00
Author: https://github.com/nico
Commit: f008e83eae
Pull-request: https://github.com/SerenityOS/serenity/pull/3036
1 changed files with 6 additions and 0 deletions
|
@ -965,6 +965,12 @@ void Editor::handle_read_event()
|
||||||
do_backspace();
|
do_backspace();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// ^K
|
||||||
|
if (code_point == ctrl('K')) {
|
||||||
|
while (m_cursor < m_buffer.size())
|
||||||
|
do_delete();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// ^L
|
// ^L
|
||||||
if (code_point == ctrl('L')) {
|
if (code_point == ctrl('L')) {
|
||||||
printf("\033[3J\033[H\033[2J"); // Clear screen.
|
printf("\033[3J\033[H\033[2J"); // Clear screen.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue