mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
don't require runtimes to implement all callbacks
This commit is contained in:
@ -917,8 +917,17 @@ pub fn keyCallback(
|
||||
}, .{ .instant = {} });
|
||||
},
|
||||
|
||||
.previous_tab => self.rt_surface.gotoPreviousTab(),
|
||||
.next_tab => self.rt_surface.gotoNextTab(),
|
||||
.previous_tab => {
|
||||
if (@hasDecl(apprt.Surface, "gotoPreviousTab")) {
|
||||
self.rt_surface.gotoPreviousTab();
|
||||
} else log.warn("runtime doesn't implement gotoPreviousTab", .{});
|
||||
},
|
||||
|
||||
.next_tab => {
|
||||
if (@hasDecl(apprt.Surface, "gotoNextTab")) {
|
||||
self.rt_surface.gotoNextTab();
|
||||
} else log.warn("runtime doesn't implement gotoNextTab", .{});
|
||||
},
|
||||
|
||||
.close_window => {
|
||||
_ = self.app_mailbox.push(.{ .close = self }, .{ .instant = {} });
|
||||
|
Reference in New Issue
Block a user