try to not crash on keymap callbacks

This commit is contained in:
Squibid 2025-12-05 20:09:41 -05:00
parent 94295d3d69
commit 9d5240aaa5
Signed by: squibid
GPG key ID: BECE5684D3C4005D

View file

@ -30,7 +30,9 @@ pub fn callback(self: *const Keymap, release: bool) void {
return; return;
} }
Lua.state.call(.{ .args = 0, .results = 0 }); Lua.state.protectedCall(.{ .args = 0, .results = 0 }) catch {
// TODO: add a callback to remote lua when that gets merged
};
Lua.state.pop(-1); Lua.state.pop(-1);
} }