From f7c85f3ed8f151501fb72a1c18a48d126d89c83c Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 3 Oct 2018 15:27:55 +0000 Subject: [PATCH] Do not move the cursor when the mouse wheel is used, GitHub issue 1493. --- tmux.h | 2 +- window-copy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tmux.h b/tmux.h index 4e070249..a6770e52 100644 --- a/tmux.h +++ b/tmux.h @@ -936,7 +936,7 @@ RB_HEAD(sessions, session); /* Mouse wheel states. */ #define MOUSE_WHEEL_UP 0 -#define MOUSE_WHEEL_DOWN 64 +#define MOUSE_WHEEL_DOWN 1 /* Mouse helpers. */ #define MOUSE_BUTTONS(b) ((b) & MOUSE_MASK_BUTTONS) diff --git a/window-copy.c b/window-copy.c index 78667b1e..e35e6070 100644 --- a/window-copy.c +++ b/window-copy.c @@ -529,7 +529,7 @@ window_copy_command(struct window_pane *wp, struct client *c, struct session *s, return; command = args->argv[0]; - if (m != NULL && m->valid) + if (m != NULL && m->valid && !MOUSE_WHEEL(m->b)) window_copy_move_mouse(m); if (args->argc == 1) {