mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibLine: Add comments for which keys trigger VWERASE and VKILL
This commit is contained in:
parent
f29c5c3a41
commit
5d343e1c29
Notes:
sideshowbarker
2024-07-19 04:12:58 +09:00
Author: https://github.com/nico
Commit: 5d343e1c29
Pull-request: https://github.com/SerenityOS/serenity/pull/3026
1 changed files with 2 additions and 0 deletions
|
@ -797,6 +797,7 @@ void Editor::handle_read_event()
|
|||
}
|
||||
m_times_tab_pressed = 0; // Safe to say if we get here, the user didn't press TAB
|
||||
|
||||
// Normally ^W. `stty werase \^n` can change it to ^N (or something else), but Serenity doesn't have `stty` yet.
|
||||
if (code_point == m_termios.c_cc[VWERASE]) {
|
||||
bool has_seen_nonspace = false;
|
||||
while (m_cursor > 0) {
|
||||
|
@ -810,6 +811,7 @@ void Editor::handle_read_event()
|
|||
}
|
||||
continue;
|
||||
}
|
||||
// Normally ^U. `stty kill \^n` can change it to ^N (or something else), but Serenity doesn't have `stty` yet.
|
||||
if (code_point == m_termios.c_cc[VKILL]) {
|
||||
for (size_t i = 0; i < m_cursor; ++i)
|
||||
remove_at_index(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue