aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-11 08:14:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-14 05:38:55 +0000
commitcddeaa2c1c648682e5d966d173f1663bee1d95a9 (patch)
tree087258971db51544587f17aac0391adb3c6a8caf /selection.c
parentdoc: footrc: document the new mouse actions (diff)
selection: update: don't update if there's no ongoing selection
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index 3eadf2ea..d0ed7bae 100644
--- a/selection.c
+++ b/selection.c
@@ -311,6 +311,9 @@ selection_update(struct terminal *term, int col, int row)
if (term->selection.start.row < 0)
return;
+ if (!term->selection.ongoing)
+ return;
+
LOG_DBG("selection updated: start = %d,%d, end = %d,%d -> %d, %d",
term->selection.start.row, term->selection.start.col,
term->selection.end.row, term->selection.end.col,