diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-08-20 20:04:55 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-21 16:10:51 +0200 |
commit | 238e87de4e0b805caad470c70acef989e493b810 (patch) | |
tree | 68991d85a82c62257feeceb05ee607d675adbb85 /Libraries/LibLine/InternalFunctions.cpp | |
parent | c8cf4651742053e11b72d736bb59a6714e89d8c7 (diff) | |
download | serenity-238e87de4e0b805caad470c70acef989e493b810.zip |
LibLine: Handle Ctrl-C and Ctrl-D in a way similar to other line editors
Makes C-c print "^C" and continue prompting on a new line.
Also fixes a problem where an interrupted get_line() would need more
read()'s than required to update the display.
Diffstat (limited to 'Libraries/LibLine/InternalFunctions.cpp')
-rw-r--r-- | Libraries/LibLine/InternalFunctions.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibLine/InternalFunctions.cpp b/Libraries/LibLine/InternalFunctions.cpp index 680bd62d0a..83b93e3c80 100644 --- a/Libraries/LibLine/InternalFunctions.cpp +++ b/Libraries/LibLine/InternalFunctions.cpp @@ -168,6 +168,7 @@ void Editor::finish_edit() if (!m_always_refresh) { m_input_error = Error::Eof; finish(); + really_quit_event_loop(); } } |