From 7bd9cdf6fcf43e0edc8ab3a4accf2009ca5aa35e Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 21 Oct 2021 08:23:48 +0000 Subject: [PATCH 1/2] Show error if user option doesn't exist, GitHub issue 2938. --- cmd-show-options.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd-show-options.c b/cmd-show-options.c index bdcd3e78..7ac7e455 100644 --- a/cmd-show-options.c +++ b/cmd-show-options.c @@ -127,6 +127,12 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item) parent = 0; if (o != NULL) cmd_show_options_print(self, item, o, idx, parent); + else if (*name == '@') { + if (args_has(args, 'q')) + goto fail; + cmdq_error(item, "invalid option: %s", argument); + goto fail; + } free(name); free(argument); From 289ac55ebde18df237ad21734ba4056896d11022 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 21 Oct 2021 08:36:51 +0000 Subject: [PATCH 2/2] Correctly adjust the end pointer for a two character terminator before decoding OSC 52 response, from Daniel Ekloef in GitHub issue 2942. --- tty-keys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tty-keys.c b/tty-keys.c index 6dfa70f3..65b600c0 100644 --- a/tty-keys.c +++ b/tty-keys.c @@ -1204,6 +1204,9 @@ tty_keys_clipboard(__unused struct tty *tty, const char *buf, size_t len, buf += 5; end -= 5; + /* Adjust end so that it points to the start of the terminator. */ + end -= terminator - 1; + /* Get the second argument. */ while (end != 0 && *buf != ';') { buf++;