mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
input: add crash binding action, remove key input crash
This commit is contained in:
@ -1333,8 +1333,6 @@ pub fn keyCallback(
|
||||
self: *Surface,
|
||||
event: input.KeyEvent,
|
||||
) !InputEffect {
|
||||
// To test crash reporting
|
||||
if (true) @panic("OH NO");
|
||||
// log.debug("text keyCallback event={}", .{event});
|
||||
|
||||
// Setup our inspector event if we have an inspector.
|
||||
@ -3675,6 +3673,8 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
||||
|
||||
.quit => try self.app.setQuit(),
|
||||
|
||||
.crash => @panic("crash binding action, crashing intentionally"),
|
||||
|
||||
.adjust_selection => |direction| {
|
||||
self.renderer_state.mutex.lock();
|
||||
defer self.renderer_state.mutex.unlock();
|
||||
|
@ -300,6 +300,13 @@ pub const Action = union(enum) {
|
||||
/// Quit ghostty.
|
||||
quit: void,
|
||||
|
||||
/// Crash ghostty. This is funny, but is used for testing crash handling.
|
||||
/// It is shipped in production builds because sometimes we need to
|
||||
/// test crash handling works for a user who may have some specific
|
||||
/// configuration. This is not bound by default and I recommend not
|
||||
/// binding it.
|
||||
crash: void,
|
||||
|
||||
pub const CursorKey = struct {
|
||||
normal: []const u8,
|
||||
application: []const u8,
|
||||
|
Reference in New Issue
Block a user