When the mode-mouse option is on, support dragging to make a selection

in copy mode.

Also support the scroll wheel, although xterm strangely does not ignore
it in application mouse mode, causing redraw artifacts when scrolling up
(other terminals appear to be better behaved).
This commit is contained in:
Nicholas Marriott
2010-05-31 19:51:29 +00:00
parent e1e120de1c
commit 43fa9a9ba6
5 changed files with 67 additions and 16 deletions

View File

@@ -612,7 +612,8 @@ tty_keys_mouse(const char *buf, size_t len, size_t *size, struct mouse_event *m)
return (1);
*size = 6;
log_debug("mouse input is: %.6s", buf);
log_debug(
"mouse input: %.6s (%hhu,%hhu/%hhu)", buf, buf[4], buf[5], buf[3]);
m->b = buf[3];
m->x = buf[4];