This commit is contained in:
2025-12-12 22:19:44 +00:00
parent 06c7b7dfaa
commit e6ce95a1d4
6 changed files with 484 additions and 465 deletions

View File

@@ -1,3 +1,4 @@
#include "../include/main.h"
#include "../include/editor.h"
#include "../include/ts.h"
#include "../include/ui.h"
@@ -9,10 +10,11 @@
std::atomic<bool> running{true};
Queue<KeyEvent> event_queue;
char m = NORMAL;
void background_worker(Editor *editor) {
while (running) {
ts_collect_spans(editor);
std::this_thread::sleep_for(std::chrono::milliseconds(16));
}
}
@@ -25,6 +27,7 @@ void input_listener() {
if (event.key_type == KEY_CHAR && event.c == CTRL('q'))
running = false;
event_queue.push(event);
std::this_thread::sleep_for(std::chrono::microseconds(100));
}
}