refactor: support direct calling of keybind.BindingSet
This commit is contained in:
parent
613b95c2af
commit
6643341574
1 changed files with 2 additions and 1 deletions
|
|
@ -667,7 +667,7 @@ const BindingSet = struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn receive(self: *const @This(), _: tp.pid_ref, m: tp.message) error{Exit}!bool {
|
pub fn receive(self: *const @This(), _: tp.pid_ref, m: tp.message) error{Exit}!bool {
|
||||||
var event: input.Event = 0;
|
var event: input.Event = 0;
|
||||||
var keypress: input.Key = 0;
|
var keypress: input.Key = 0;
|
||||||
var keypress_shifted: input.Key = 0;
|
var keypress_shifted: input.Key = 0;
|
||||||
|
|
@ -696,6 +696,7 @@ const BindingSet = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (binding.commands) |*cmd| try cmd.execute();
|
for (binding.commands) |*cmd| try cmd.execute();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
} else if (try m.match(.{"F"})) {
|
} else if (try m.match(.{"F"})) {
|
||||||
self.flush() catch |e| return tp.exit_error(e, @errorReturnTrace());
|
self.flush() catch |e| return tp.exit_error(e, @errorReturnTrace());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue