aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-04 17:15:50 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-04 17:15:50 +0000
commit3ae210d4c5100e484b4a3b1cee1c605e15759993 (patch)
tree3fef341184058fe46496ebd0647dea72f59a8c40 /selection.c
parentscrollback: use scroll damage to speed up scrolling (diff)
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).
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c3
1 files changed, 2 insertions, 1 deletions
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 *