1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:07:34 +00:00

LibLine: Add comments for which keys trigger VWERASE and VKILL

This commit is contained in:
Nico Weber 2020-08-06 11:47:06 -04:00 committed by Andreas Kling
parent f29c5c3a41
commit 5d343e1c29

View file

@ -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);