diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp index a38fb2d5f0..b1ed9dcdb4 100644 --- a/Libraries/LibLine/Editor.cpp +++ b/Libraries/LibLine/Editor.cpp @@ -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; } diff --git a/Libraries/LibLine/Editor.h b/Libraries/LibLine/Editor.h index 6ac01bb9e5..384966e0bd 100644 --- a/Libraries/LibLine/Editor.h +++ b/Libraries/LibLine/Editor.h @@ -134,6 +134,7 @@ public: Function(const String&)> on_tab_complete_first_token; Function(const String&)> on_tab_complete_other_token; + Function on_interrupt_handled; Function on_display_refresh; // FIXME: we will have to kindly ask our instantiators to set our signal handlers