mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
LibLine: Put ctrl-key handlers in alphabetical order
This commit is contained in:
parent
4726966ad7
commit
8c82138b22
1 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue