1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:17:35 +00:00

LibLine: Actually remove the two levels of deferred_invoke

4d5cdcc893 partially reverted the changes
from d8c5eeceab, but it reverted too much
and reintroduced the bug.
This commit finally fixes the actual bug.
The author hasn't been in his best committing state today.
This commit is contained in:
Ali Mohammad Pur 2021-06-07 02:22:40 +04:30
parent 4d5cdcc893
commit 7700ee2722

View file

@ -588,10 +588,8 @@ void Editor::interrupted()
m_is_editing = false;
restore();
m_notifier->set_enabled(false);
deferred_invoke([this](auto&) {
m_notifier = nullptr;
Core::EventLoop::current().quit(Retry);
});
m_notifier = nullptr;
Core::EventLoop::current().quit(Retry);
}
void Editor::resized()
@ -623,12 +621,9 @@ void Editor::really_quit_event_loop()
restore();
m_returned_line = string;
m_notifier->set_enabled(false);
deferred_invoke([this](auto&) {
m_notifier = nullptr;
Core::EventLoop::current().quit(Exit);
});
m_notifier = nullptr;
Core::EventLoop::current().quit(Exit);
}
auto Editor::get_line(const String& prompt) -> Result<String, Editor::Error>