aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/selection.c b/selection.c
index 354f6f53..ffe06c27 100644
--- a/selection.c
+++ b/selection.c
@@ -25,9 +25,10 @@ bool
selection_enabled(const struct terminal *term, struct seat *seat)
{
return
- term->mouse_tracking == MOUSE_NONE ||
- term_mouse_grabbed(term, seat) ||
- term->is_searching;
+ seat->mouse.col >= 0 && seat->mouse.row >= 0 &&
+ (term->mouse_tracking == MOUSE_NONE ||
+ term_mouse_grabbed(term, seat) ||
+ term->is_searching);
}
bool