diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-11-24 00:01:16 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-11-24 00:01:16 +0000 |
commit | 3f47ff6ecd7c126474c77d03f7886b7ef232d468 (patch) | |
tree | 053298180bde040040f91c526a4bec0118919f76 /input-keys.c | |
parent | b642b3c8e388d0c9a81d18ae183bb62cfd24d434 (diff) | |
parent | 2adf3f42ee451b30ef492229dac322808f93d8dc (diff) | |
download | rtmux-3f47ff6ecd7c126474c77d03f7886b7ef232d468.tar.gz rtmux-3f47ff6ecd7c126474c77d03f7886b7ef232d468.tar.bz2 rtmux-3f47ff6ecd7c126474c77d03f7886b7ef232d468.zip |
Merge branch 'obsd-master'
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 9538fc42..0a18f37e 100644 --- a/input-keys.c +++ b/input-keys.c @@ -242,11 +242,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; |