Fix mouse, fix allocator in file iter, GetCFiles

This commit is contained in:
krzosa
2025-05-01 08:26:55 +02:00
parent e652d5b0e2
commit 6374f3cd1a
8 changed files with 63 additions and 56 deletions

View File

@@ -397,6 +397,14 @@ function AddCo(f)
return Coroutines[i]
end
OnCommandCallbacks = {}
table.insert(OnCommandCallbacks, function (e)
if e.key == SDLK_F and e.ctrl == 1 and e.shift == 1 then
C("git grep -n "..GetLoadWord().." :/") end
if e.key == SDLK_L and e.ctrl == 1 then
Eval(GetLoadWord()) end
end)
function OnUpdate(e)
local new_co_list = {}
for key, co in pairs(Coroutines) do
@@ -409,14 +417,6 @@ function OnUpdate(e)
Coroutines = new_co_list
end
OnCommandCallbacks = {}
table.insert(OnCommandCallbacks, function (e)
if e.key == SDLK_F and e.ctrl == 1 and e.shift == 1 then
C("git grep -n "..GetLoadWord().." :/") end
if e.key == SDLK_L and e.ctrl == 1 then
Eval(GetLoadWord()) end
end)
function OnCommand(e)
for i = #OnCommandCallbacks,1,-1 do
on_command = OnCommandCallbacks[i]