mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 18:27:42 +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;
|
m_refresh_needed = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// ^A
|
||||||
|
if (codepoint == ctrl('A')) {
|
||||||
|
m_cursor = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// ^E
|
||||||
|
if (codepoint == ctrl('E')) {
|
||||||
|
m_cursor = m_buffer.size();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// ^L
|
// ^L
|
||||||
if (codepoint == ctrl('L')) {
|
if (codepoint == ctrl('L')) {
|
||||||
printf("\033[3J\033[H\033[2J"); // Clear screen.
|
printf("\033[3J\033[H\033[2J"); // Clear screen.
|
||||||
|
@ -757,11 +767,6 @@ void Editor::handle_read_event()
|
||||||
m_refresh_needed = true;
|
m_refresh_needed = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// ^A
|
|
||||||
if (codepoint == ctrl('A')) {
|
|
||||||
m_cursor = 0;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// ^R
|
// ^R
|
||||||
if (codepoint == ctrl('R')) {
|
if (codepoint == ctrl('R')) {
|
||||||
if (m_is_searching) {
|
if (m_is_searching) {
|
||||||
|
@ -890,11 +895,6 @@ void Editor::handle_read_event()
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// ^E
|
|
||||||
if (codepoint == ctrl('E')) {
|
|
||||||
m_cursor = m_buffer.size();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (codepoint == '\n') {
|
if (codepoint == '\n') {
|
||||||
finish();
|
finish();
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue