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.
This commit is contained in:
Nicholas Marriott
2011-01-03 23:35:21 +00:00
parent 5158dd9a8d
commit ac3b78a841
11 changed files with 128 additions and 22 deletions

View File

@ -1161,6 +1161,9 @@ input_csi_dispatch(struct input_ctx *ictx)
case 1003:
screen_write_mousemode_off(&ictx->ctx);
break;
case 1005:
screen_write_utf8mousemode(&ictx->ctx, 0);
break;
case 1049:
window_pane_alternate_off(wp, &ictx->cell);
break;
@ -1209,6 +1212,9 @@ input_csi_dispatch(struct input_ctx *ictx)
case 1003:
screen_write_mousemode_on(&ictx->ctx, MODE_MOUSE_ANY);
break;
case 1005:
screen_write_utf8mousemode(&ictx->ctx, 1);
break;
case 1049:
window_pane_alternate_on(wp, &ictx->cell);
break;