mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibLine: Put ctrl-key handlers in alphabetical order
This commit is contained in:
committed by
Andreas Kling
parent
4726966ad7
commit
8c82138b22
@@ -749,6 +749,16 @@ void Editor::handle_read_event()
|
||||
m_refresh_needed = true;
|
||||
continue;
|
||||
}
|
||||
// ^A
|
||||
if (codepoint == ctrl('A')) {
|
||||
m_cursor = 0;
|
||||
continue;
|
||||
}
|
||||
// ^E
|
||||
if (codepoint == ctrl('E')) {
|
||||
m_cursor = m_buffer.size();
|
||||
continue;
|
||||
}
|
||||
// ^L
|
||||
if (codepoint == ctrl('L')) {
|
||||
printf("\033[3J\033[H\033[2J"); // Clear screen.
|
||||
@@ -757,11 +767,6 @@ void Editor::handle_read_event()
|
||||
m_refresh_needed = true;
|
||||
continue;
|
||||
}
|
||||
// ^A
|
||||
if (codepoint == ctrl('A')) {
|
||||
m_cursor = 0;
|
||||
continue;
|
||||
}
|
||||
// ^R
|
||||
if (codepoint == ctrl('R')) {
|
||||
if (m_is_searching) {
|
||||
@@ -890,11 +895,6 @@ void Editor::handle_read_event()
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// ^E
|
||||
if (codepoint == ctrl('E')) {
|
||||
m_cursor = m_buffer.size();
|
||||
continue;
|
||||
}
|
||||
if (codepoint == '\n') {
|
||||
finish();
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user