mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibLine: Do not ignore Ctrl-C when buffer is empty
I am told that this is how people test their shells. That's bizarre to me, but sure :^)
This commit is contained in:
parent
8d293601b6
commit
cf4870c93e
Notes:
sideshowbarker
2024-07-19 03:21:07 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/cf4870c93e2 Pull-request: https://github.com/SerenityOS/serenity/pull/3246
1 changed files with 2 additions and 7 deletions
|
@ -563,17 +563,12 @@ void Editor::handle_interrupt_event()
|
|||
}
|
||||
}
|
||||
|
||||
if (!m_buffer.is_empty()) {
|
||||
fprintf(stderr, "^C");
|
||||
fflush(stderr);
|
||||
}
|
||||
fprintf(stderr, "^C");
|
||||
fflush(stderr);
|
||||
|
||||
if (on_interrupt_handled)
|
||||
on_interrupt_handled();
|
||||
|
||||
if (m_buffer.is_empty())
|
||||
return;
|
||||
|
||||
m_buffer.clear();
|
||||
m_cursor = 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue