commit efdd117f3bb0557332357dc4faffa1a35dee7f0a
parent 8da9f2710a355a6e78f6c51f05feeb727f902ff8
Author: Byron Torres <b@torresjrjr.com>
Date: Sun, 17 Mar 2024 22:12:43 +0000
add missing assert_noaddrs()
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/command.ha b/command.ha
@@ -445,6 +445,8 @@ fn cmd_prompt(s: *Session, cmd: *Command) (void | Error) = {
};
fn cmd_quit(s: *Session, cmd: *Command) (void | Error) = {
+ assert_noaddrs(s, cmd.linenums)?;
+
if (s.buf.modified && !s.warned) {
s.warned = true;
return WarnBufferModified;
@@ -454,6 +456,8 @@ fn cmd_quit(s: *Session, cmd: *Command) (void | Error) = {
};
fn cmd_quit_forced(s: *Session, cmd: *Command) (void | Error) = {
+ assert_noaddrs(s, cmd.linenums)?;
+
return Quit;
};
@@ -692,6 +696,8 @@ fn cmd_linenumber(s: *Session, cmd: *Command) (void | Error) = {
fn cmd_shellescape(s: *Session, cmd: *Command) (void | Error) = {
s.warned = false;
+ assert_noaddrs(s, cmd.linenums)?;
+
let t = strings::iter(cmd.arg1);
let new = memio::dynamic(); defer io::close(&new)!;
let preview = false;