mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-23 16:14:23 +00:00
LibLine: Handle interrupts/window size changes internally
This commit is contained in:
committed by
Andreas Kling
parent
238e87de4e
commit
30554c969c
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user