New UI buffer thing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user