summaryrefslogtreecommitdiffstats
path: root/input-keys.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-08-04 17:05:35 +0000
committerTiago Cunha <tcunha@gmx.com>2011-08-04 17:05:35 +0000
commit3ce1b91b1be4f1e2815619dbf3db7448916d7f49 (patch)
treedce4fe1a7e90ea99dc2d6aeaa08598c4da935cde /input-keys.c
parent2589d117b0b48baefcb39ed3403481eaa24877e8 (diff)
Sync OpenBSD patchset 941:
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.
Diffstat (limited to 'input-keys.c')
-rw-r--r--input-keys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/input-keys.c b/input-keys.c
index 3ed6137b..3fda6f86 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -203,6 +203,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) {
@@ -220,7 +221,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)