fix: make keybind module respect command.suppressed_errors list

Also, make suppressed_errors a static string map for a little extra
performance.
This commit is contained in:
CJ van den Berg 2025-07-15 13:14:47 +02:00
parent 0003a52aaf
commit c5655468e3
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 12 additions and 8 deletions

View file

@ -291,7 +291,7 @@ const Command = struct {
fn execute(self: *@This()) !void {
const id = self.command_id orelse
command.get_id_cache(self.command, &self.command_id) orelse {
return tp.exit_fmt("CommandNotFound: {s}", .{self.command});
return command.notFoundError(self.command);
};
var buf: [2048]u8 = undefined;
@memcpy(buf[0..self.args.len], self.args);