diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 835bb5b..4140d56 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -3320,7 +3320,11 @@ pub const Editor = struct { } pub fn goto_next_diagnostic(self: *Self, _: Context) Result { - if (self.diagnostics.items.len == 0) return command.executeName("goto_next_file", .{}); + if (self.diagnostics.items.len == 0) { + if (command.getId("goto_next_file")) |id| + return command.execute(id, .{}); + return; + } self.sort_diagnostics(); const primary = self.get_primary(); for (self.diagnostics.items) |*diag| { @@ -3331,7 +3335,11 @@ pub const Editor = struct { } pub fn goto_prev_diagnostic(self: *Self, _: Context) Result { - if (self.diagnostics.items.len == 0) return command.executeName("goto_prev_file", .{}); + if (self.diagnostics.items.len == 0) { + if (command.getId("goto_prev_file")) |id| + return command.execute(id, .{}); + return; + } self.sort_diagnostics(); const primary = self.get_primary(); var i = self.diagnostics.items.len - 1;