summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-03-22 10:34:46 +0000
committernicm <nicm@openbsd.org>2013-03-22 10:34:46 +0000
commitde5e63815f395a7251b552b07bf8fc392128605d (patch)
treecc57a917fd2dbae80642785a2351a0b951e66f5d /usr.bin/tmux/tty.c
parentSupport the latest theory for mouse input, this is enabled/disabled with (diff)
downloadwireguard-openbsd-de5e63815f395a7251b552b07bf8fc392128605d.tar.xz
wireguard-openbsd-de5e63815f395a7251b552b07bf8fc392128605d.zip
Correctly handle UTF8 mouse option being toggled, from Egmont Koblinger.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 92421a4dc85..da3c0dd75c6 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.153 2013/03/22 10:33:50 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.154 2013/03/22 10:34:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -489,7 +489,7 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
}
tty->cstyle = s->cstyle;
}
- if (changed & ALL_MOUSE_MODES) {
+ if (changed & (ALL_MOUSE_MODES|MODE_MOUSE_UTF8)) {
if (mode & ALL_MOUSE_MODES) {
/*
* Enable the UTF-8 (1005) extension if configured to.
@@ -500,6 +500,8 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
*/
if (mode & MODE_MOUSE_UTF8)
tty_puts(tty, "\033[?1005h");
+ else
+ tty_puts(tty, "\033[?1005l");
tty_puts(tty, "\033[?1006h");
if (mode & MODE_MOUSE_ANY)