From 8824dae6f7b21f95ea824ecc1abc31140763c971 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 3 Apr 2014 08:15:17 +0000 Subject: [PATCH] A couple of trivial mouse-related style nits. --- input-keys.c | 2 +- tty-keys.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/input-keys.c b/input-keys.c index 9247a995..0370a684 100644 --- a/input-keys.c +++ b/input-keys.c @@ -245,7 +245,7 @@ input_mouse(struct window_pane *wp, struct session *s, struct mouse_event *m) paste_send_pane(pb, wp, "\r", wp->screen->mode & MODE_BRACKETPASTE); } - } else if ((m->xb & 3) != 1 && + } else if (m->button != 1 && options_get_number(&wp->window->options, "mode-mouse") == 1) { if (window_pane_set_mode(wp, &window_copy_mode) == 0) { window_copy_init_from_pane(wp); diff --git a/tty-keys.c b/tty-keys.c index e0e794cc..1116df2b 100644 --- a/tty-keys.c +++ b/tty-keys.c @@ -756,9 +756,9 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size) m->wheel = MOUSE_WHEEL_DOWN; m->event = MOUSE_EVENT_WHEEL; } else if ((b & MOUSE_MASK_BUTTONS) == 3) { - if (~m->event & MOUSE_EVENT_DRAG && x == m->x && y == m->y) { + if (~m->event & MOUSE_EVENT_DRAG && x == m->x && y == m->y) m->event = MOUSE_EVENT_CLICK; - } else + else m->event = MOUSE_EVENT_DRAG; m->event |= MOUSE_EVENT_UP; } else {