mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:17:35 +00:00
LibLine: Handle interrupts/window size changes internally
This commit is contained in:
parent
238e87de4e
commit
30554c969c
4 changed files with 9 additions and 10 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/select.h>
|
||||
|
@ -404,6 +405,14 @@ void Editor::initialize()
|
|||
for (auto& keybind : m_configuration.keybindings)
|
||||
register_key_input_callback(keybind);
|
||||
|
||||
Core::EventLoop::register_signal(SIGINT, [this](int) {
|
||||
interrupted();
|
||||
});
|
||||
|
||||
Core::EventLoop::register_signal(SIGWINCH, [this](int) {
|
||||
resized();
|
||||
});
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue