From 78ca1b02656808908e2c5dc19909966c3d3bb555 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 8 Mar 2017 14:34:35 +0000 Subject: Always send smkx to the terminal outside, the keys we get from terminfo are the keys when it is on. --- tty.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tty.c b/tty.c index acc7ab54..0ed6125e 100644 --- a/tty.c +++ b/tty.c @@ -235,7 +235,7 @@ tty_start_tty(struct tty *tty) tty_putcode(tty, TTYC_SMCUP); - tty_putcode(tty, TTYC_RMKX); + tty_putcode(tty, TTYC_SMKX); if (tty_use_acs(tty)) tty_putcode(tty, TTYC_ENACS); tty_putcode(tty, TTYC_CLEAR); @@ -573,12 +573,6 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s) tty_puts(tty, "\033[?1006l"); } } - if (changed & MODE_KKEYPAD) { - if (mode & MODE_KKEYPAD) - tty_putcode(tty, TTYC_SMKX); - else - tty_putcode(tty, TTYC_RMKX); - } if (changed & MODE_BRACKETPASTE) { if (mode & MODE_BRACKETPASTE) tty_puts(tty, "\033[?2004h"); -- cgit From 41b31fe2401465916e186ea6e111ed394fcc6c86 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 8 Mar 2017 14:43:40 +0000 Subject: Handle empty options correctly. --- options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/options.c b/options.c index 4de25937..4cd3ea10 100644 --- a/options.c +++ b/options.c @@ -427,6 +427,8 @@ options_match(const char *s, int *idx, int* ambiguous) size_t namelen; name = options_parse(s, idx); + if (name == NULL) + return (NULL); namelen = strlen(name); if (*name == '@') { -- cgit