diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-01-03 23:35:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-01-03 23:35:21 +0000 |
commit | ac3b78a84178a308536a56ea114b0f6f8ce6fb47 (patch) | |
tree | 71c4a4c1030c29d670c965315b0c87dccf9c8972 /screen-write.c | |
parent | 5158dd9a8dddf34a00ec6359840488d34faabd88 (diff) | |
download | rtmux-ac3b78a84178a308536a56ea114b0f6f8ce6fb47.tar.gz rtmux-ac3b78a84178a308536a56ea114b0f6f8ce6fb47.tar.bz2 rtmux-ac3b78a84178a308536a56ea114b0f6f8ce6fb47.zip |
Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.
If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.
With help and based on code from hsim at gmx.li.
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/screen-write.c b/screen-write.c index c4e873b1..88c183ae 100644 --- a/screen-write.c +++ b/screen-write.c @@ -829,6 +829,18 @@ screen_write_insertmode(struct screen_write_ctx *ctx, int state) s->mode &= ~MODE_INSERT; } +/* Set UTF-8 mouse mode. */ +void +screen_write_utf8mousemode(struct screen_write_ctx *ctx, int state) +{ + struct screen *s = ctx->s; + + if (state) + s->mode |= MODE_MOUSE_UTF8; + else + s->mode &= ~MODE_MOUSE_UTF8; +} + /* Set mouse mode off. */ void screen_write_mousemode_off(struct screen_write_ctx *ctx) |