diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-22 10:34:47 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-22 10:34:47 +0000 |
commit | 9377982f18dc7ddb524ec1774115fdffd9a6b507 (patch) | |
tree | dea6f48fc670ef46a153a20ff176fb459700b9f0 /usr.bin | |
parent | ffac827263f4af2a6dc14c6618e570c44bd82a20 (diff) |
Correctly handle UTF8 mouse option being toggled, from Egmont Koblinger.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/tty.c | 6 |
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) |