diff options
author | nicm <nicm> | 2015-11-23 23:47:57 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-11-23 23:47:57 +0000 |
commit | 2adf3f42ee451b30ef492229dac322808f93d8dc (patch) | |
tree | 4740458b087f994de2d701fa4c3aef8cbf423544 /input-keys.c | |
parent | 32e510bd70eedbeec8590b9bf786b11430ddaac3 (diff) | |
download | rtmux-2adf3f42ee451b30ef492229dac322808f93d8dc.tar.gz rtmux-2adf3f42ee451b30ef492229dac322808f93d8dc.tar.bz2 rtmux-2adf3f42ee451b30ef492229dac322808f93d8dc.zip |
Partly revert previous, it is harmless to keep support for UTF-8 mouse
mode inside tmux, just no longer support it for tmux itself.
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/input-keys.c b/input-keys.c index 4fee2f58..2915cb45 100644 --- a/input-keys.c +++ b/input-keys.c @@ -243,11 +243,17 @@ input_key_mouse(struct window_pane *wp, struct mouse_event *m) * is because an old style mouse release event cannot be converted into * the new SGR format, since the released button is unknown). Otherwise * pretend that tmux doesn't speak this extension, and fall back to the + * UTF-8 (1005) extension if the application requested, or to the * legacy format. */ if (m->sgr_type != ' ' && (wp->screen->mode & MODE_MOUSE_SGR)) { len = xsnprintf(buf, sizeof buf, "\033[<%u;%u;%u%c", m->sgr_b, x + 1, y + 1, m->sgr_type); + } else if (wp->screen->mode & MODE_MOUSE_UTF8) { + len = xsnprintf(buf, sizeof buf, "\033[M"); + len += utf8_split2(m->b + 32, &buf[len]); + len += utf8_split2(x + 33, &buf[len]); + len += utf8_split2(y + 33, &buf[len]); } else { if (m->b > 223) return; |