summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-10-05 13:29:19 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-10-05 13:29:19 +0000
commitda840c6b3393179934a99b6616d48116aa4bdb40 (patch)
treede495e4ef9b71cc155a83d2e8ec9d9bde934c4cc /usr.bin/tmux/input.c
parentd28d0a68d32fa7886ca9b831dd7579be479817a4 (diff)
Add support for the xterm(1) title stack, from Brad Town, GitHub issue
1075.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r--usr.bin/tmux/input.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index 798a4dd0d2e..804cc73737f 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.128 2017/09/10 08:01:23 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.129 2017/10/05 13:29:18 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1693,11 +1693,32 @@ input_csi_dispatch_winops(struct input_ctx *ictx)
/* FALLTHROUGH */
case 9:
case 10:
+ m++;
+ if (input_get(ictx, m, 0, -1) == -1)
+ return;
+ break;
case 22:
+ m++;
+ switch (input_get(ictx, m, 0, -1)) {
+ case -1:
+ return;
+ case 0:
+ case 2:
+ screen_push_title(ictx->ctx.s);
+ break;
+ }
+ break;
case 23:
m++;
- if (input_get(ictx, m, 0, -1) == -1)
+ switch (input_get(ictx, m, 0, -1)) {
+ case -1:
return;
+ case 0:
+ case 2:
+ screen_pop_title(ictx->ctx.s);
+ server_status_window(ictx->wp->window);
+ break;
+ }
break;
case 18:
input_reply(ictx, "\033[8;%u;%ut", wp->sy, wp->sx);