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

LibLine: Handle interrupts/window size changes internally

This commit is contained in:
AnotherTest 2020-08-20 20:09:48 +04:30 committed by Andreas Kling
parent 238e87de4e
commit 30554c969c
4 changed files with 9 additions and 10 deletions

View file

@ -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;
}