LibLine: Ensure suggestions are reset after ^C

This commit is contained in:
Gabriel Tassinari 2024-02-28 05:45:47 -03:00 committed by Ali Mohammad Pur
parent 3bd9566847
commit 30d8c5f301
Notes: sideshowbarker 2024-07-17 18:08:55 +09:00

View File

@ -628,8 +628,8 @@ ErrorOr<void> Editor::interrupted()
auto stderr_stream = TRY(Core::File::standard_error());
TRY(reposition_cursor(*stderr_stream, true));
if (TRY(m_suggestion_display->cleanup())) {
m_times_tab_pressed = 0;
TRY(reposition_cursor(*stderr_stream, true));
TRY(cleanup_suggestions());
}
TRY(stderr_stream->write_until_depleted("\r"sv.bytes()));
}