From 3ae210d4c5100e484b4a3b1cee1c605e15759993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 4 Aug 2019 19:15:50 +0200 Subject: [PATCH] selection: only disable selection when mouse drag/motion is on This allows us to select text in e.g. man/less while still being able to use LESS=--MOUSE (i.e. enable scrolling with mouse). --- selection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selection.c b/selection.c index 92bc7514..7a0d6960 100644 --- a/selection.c +++ b/selection.c @@ -20,7 +20,8 @@ static bool selection_enabled(const struct terminal *term) { - return term->mouse_tracking == MOUSE_NONE; + return (term->mouse_tracking != MOUSE_DRAG && + term->mouse_tracking != MOUSE_MOTION); } static char *