summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/input-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-05-05 18:48:31 +0000
committernicm <nicm@openbsd.org>2012-05-05 18:48:31 +0000
commit2c71bf5ac17a867a6a5da594d2b9681da59aeafc (patch)
tree2b96fb9862f61c681966724c376388cc6c5dde77 /usr.bin/tmux/input-keys.c
parentTidy up by adding a macro for the pane being the full screen width, from (diff)
downloadwireguard-openbsd-2c71bf5ac17a867a6a5da594d2b9681da59aeafc.tar.xz
wireguard-openbsd-2c71bf5ac17a867a6a5da594d2b9681da59aeafc.zip
Only enter copy mode on scroll up, from Ailin Nemui.
Diffstat (limited to 'usr.bin/tmux/input-keys.c')
-rw-r--r--usr.bin/tmux/input-keys.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c
index beb819b96f6..07018cb320e 100644
--- a/usr.bin/tmux/input-keys.c
+++ b/usr.bin/tmux/input-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input-keys.c,v 1.24 2012/04/01 20:56:47 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.25 2012/05/05 18:48:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -223,7 +223,8 @@ input_mouse(struct window_pane *wp, struct mouse_event *m)
return;
}
- if (options_get_number(&wp->window->options, "mode-mouse") == 1) {
+ if ((m->b & 3) != 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);
if (wp->mode->mouse != NULL)