mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 21:57:37 +02:00
Extend the mode-mouse option to add a third choice which means the mouse
does not enter copy mode. Patch from SF bug 3374493. In future the mode-mouse option is likely to die and be broken into several smaller options.
This commit is contained in:
@ -204,6 +204,7 @@ input_mouse(struct window_pane *wp, struct mouse_event *m)
|
||||
{
|
||||
char buf[10];
|
||||
size_t len;
|
||||
int value;
|
||||
|
||||
if (wp->screen->mode & ALL_MOUSE_MODES) {
|
||||
if (wp->screen->mode & MODE_MOUSE_UTF8) {
|
||||
@ -221,7 +222,8 @@ input_mouse(struct window_pane *wp, struct mouse_event *m)
|
||||
}
|
||||
bufferevent_write(wp->event, buf, len);
|
||||
} else if ((m->b & MOUSE_BUTTON) != MOUSE_2) {
|
||||
if (options_get_number(&wp->window->options, "mode-mouse") &&
|
||||
value = options_get_number(&wp->window->options, "mode-mouse");
|
||||
if (value == 1 &&
|
||||
window_pane_set_mode(wp, &window_copy_mode) == 0) {
|
||||
window_copy_init_from_pane(wp);
|
||||
if (wp->mode->mouse != NULL)
|
||||
|
Reference in New Issue
Block a user