refactor: rename command.get_id and add command.get_name
This commit is contained in:
parent
150374afae
commit
6372beb762
3 changed files with 10 additions and 5 deletions
|
@ -3592,7 +3592,7 @@ pub const Editor = struct {
|
|||
|
||||
pub fn goto_next_diagnostic(self: *Self, _: Context) Result {
|
||||
if (self.diagnostics.items.len == 0) {
|
||||
if (command.getId("goto_next_file")) |id|
|
||||
if (command.get_id("goto_next_file")) |id|
|
||||
return command.execute(id, .{});
|
||||
return;
|
||||
}
|
||||
|
@ -3608,7 +3608,7 @@ pub const Editor = struct {
|
|||
|
||||
pub fn goto_prev_diagnostic(self: *Self, _: Context) Result {
|
||||
if (self.diagnostics.items.len == 0) {
|
||||
if (command.getId("goto_prev_file")) |id|
|
||||
if (command.get_id("goto_prev_file")) |id|
|
||||
return command.execute(id, .{});
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ pub fn restore_state(palette: *Type) !void {
|
|||
error.TooShort => return,
|
||||
else => return e,
|
||||
}) {
|
||||
const id = command.getId(name_) orelse continue;
|
||||
const id = command.get_id(name_) orelse continue;
|
||||
set_used_time(palette, id, used_time);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue