summaryrefslogtreecommitdiff
path: root/Shell/LineEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Shell/LineEditor.cpp')
-rw-r--r--Shell/LineEditor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Shell/LineEditor.cpp b/Shell/LineEditor.cpp
index 78b70794a4..b1bd1df8e8 100644
--- a/Shell/LineEditor.cpp
+++ b/Shell/LineEditor.cpp
@@ -50,10 +50,16 @@ String LineEditor::get_line()
if (nread < 0) {
if (errno == EINTR) {
if (g.was_interrupted) {
+ g.was_interrupted = false;
if (!m_buffer.is_empty())
printf("^C");
}
- g.was_interrupted = false;
+ if (g.was_resized) {
+ g.was_resized = false;
+ printf("\033[2K\r");
+ m_buffer.clear();
+ return String::empty();
+ }
m_buffer.clear();
putchar('\n');
return String::empty();