1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

LibLine: Add a hook to run when an interrupt is handled

We do not want to clog up signal handlers by putting possibly complex
logic inside them, so allow the editor to handle that.
This commit is contained in:
AnotherTest 2020-05-13 14:22:47 +04:30 committed by Andreas Kling
parent 2c45076e68
commit 98d25324fd
2 changed files with 5 additions and 0 deletions

View file

@ -171,6 +171,10 @@ String Editor::get_line(const String& prompt)
m_buffer.clear();
m_cursor = 0;
if (on_interrupt_handled)
on_interrupt_handled();
m_refresh_needed = true;
continue;
}