summaryrefslogtreecommitdiff
path: root/Libraries/LibLine/Editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibLine/Editor.cpp')
-rw-r--r--Libraries/LibLine/Editor.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp
index 43fc388d34..f355c09417 100644
--- a/Libraries/LibLine/Editor.cpp
+++ b/Libraries/LibLine/Editor.cpp
@@ -152,16 +152,18 @@ String Editor::get_line(const String& prompt)
if (m_was_resized)
continue;
- m_was_interrupted = false;
+ finish();
+ continue;
+ }
- if (!m_buffer.is_empty())
- printf("^C");
+ m_was_interrupted = false;
- m_buffer.clear();
- m_cursor = 0;
- }
+ if (!m_buffer.is_empty())
+ printf("^C");
- finish();
+ m_buffer.clear();
+ m_cursor = 0;
+ m_refresh_needed = true;
continue;
}
perror("read failed");