summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-08-06 11:47:06 -0400
committerAndreas Kling <kling@serenityos.org>2020-08-06 19:03:06 +0200
commit5d343e1c29b8b181b8744405d9b074566c6cbc13 (patch)
treea24f4659b7865bbc59f4244535f98c54e1881ce7 /Libraries
parentf29c5c3a416bd62298cbcdec428a3759956b37e7 (diff)
downloadserenity-5d343e1c29b8b181b8744405d9b074566c6cbc13.zip
LibLine: Add comments for which keys trigger VWERASE and VKILL
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibLine/Editor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp
index 3e107b28ff..3e37c8177f 100644
--- a/Libraries/LibLine/Editor.cpp
+++ b/Libraries/LibLine/Editor.cpp
@@ -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);