diff options
author | 2020-05-16 14:16:25 +0000 | |
---|---|---|
committer | 2020-05-16 14:16:25 +0000 | |
commit | ecd9db25cb59f1a1a1a43054d625d381badcdca8 (patch) | |
tree | 0250071e69211d7abacf857a22f244a0f7323739 /usr.bin/tmux/input.c | |
parent | Add an attribute for ACS. (diff) | |
download | wireguard-openbsd-ecd9db25cb59f1a1a1a43054d625d381badcdca8.tar.xz wireguard-openbsd-ecd9db25cb59f1a1a1a43054d625d381badcdca8.zip |
Remove support for iTerm2's DSR 1337 extension and use the CSI > q
extension now supported by a few different terminals.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index c9e5c5df131..b9e1d694137 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.174 2020/04/30 13:31:22 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.175 2020/05/16 14:16:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -254,6 +254,7 @@ enum input_csi_type { INPUT_CSI_TBC, INPUT_CSI_VPA, INPUT_CSI_WINOPS, + INPUT_CSI_XDA, }; /* Control (CSI) command table. */ @@ -290,6 +291,7 @@ static const struct input_table_entry input_csi_table[] = { { 'm', "", INPUT_CSI_SGR }, { 'n', "", INPUT_CSI_DSR }, { 'q', " ", INPUT_CSI_DECSCUSR }, + { 'q', ">", INPUT_CSI_XDA }, { 'r', "", INPUT_CSI_DECSTBM }, { 's', "", INPUT_CSI_SCP }, { 't', "", INPUT_CSI_WINOPS }, @@ -1324,7 +1326,6 @@ input_csi_dispatch(struct input_ctx *ictx) struct input_table_entry *entry; int i, n, m; u_int cx, bg = ictx->cell.cell.bg; - char *copy, *cp; if (ictx->flags & INPUT_DISCARD) return (0); @@ -1456,13 +1457,6 @@ input_csi_dispatch(struct input_ctx *ictx) case 6: input_reply(ictx, "\033[%u;%uR", s->cy + 1, s->cx + 1); break; - case 1337: /* Terminal version, from iTerm2. */ - copy = xstrdup(getversion()); - for (cp = copy; *cp != '\0'; cp++) - *cp = toupper((u_char)*cp); - input_reply(ictx, "\033[TMUX %sn", copy); - free(copy); - break; default: log_debug("%s: unknown '%c'", __func__, ictx->ch); break; @@ -1597,6 +1591,12 @@ input_csi_dispatch(struct input_ctx *ictx) if (n != -1) screen_set_cursor_style(s, n); break; + case INPUT_CSI_XDA: + n = input_get(ictx, 0, 0, 0); + if (n != 0) + input_reply(ictx, "\033P>|tmux %s\033\\", getversion()); + break; + } ictx->last = -1; |