1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:14:58 +00:00

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

View file

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