New UI buffer thing

This commit is contained in:
krzosa
2025-12-28 10:29:53 +01:00
parent 00442da5dd
commit 06cb073832
8 changed files with 94 additions and 29 deletions

View File

@@ -386,11 +386,24 @@ void OnCommand(Event event) {
BSet main = GetBSet(LastActiveLayoutWindowID);
BSet active = GetBSet(ActiveWindowID);
For (CommandFunctions) {
bool executed = false;
For (active.view->hooks) {
if (it.trigger && MatchEvent(it.trigger, &event)) {
ProfileScopeEx(it.name);
it.function();
LastExecutedCommand = it.function;
LastExecutedManualCommand = it.function;
executed = true;
break;
}
}
if (executed == false) {
For (CommandFunctions) {
if (it.trigger && MatchEvent(it.trigger, &event)) {
ProfileScopeEx(it.name);
it.function();
LastExecutedManualCommand = it.function;
}
}
}
@@ -476,8 +489,7 @@ void GarbageCollect() {
RawAppendf(GCInfoBuffer, "View %d %S\n", (int)it->id.id, buffer->name);
remove_item = true;
Dealloc(&it->carets);
Dealloc(sys_allocator, it);
Dealloc(it);
}
IterRemove(Buffers) {