aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-04 11:09:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-04 11:09:09 +0000
commit2a531327dde3c86edea2baf9503d08545d8f4767 (patch)
tree3be295a50f02c2048091ee38fdcdb5f6d4b60be6 /selection.c
parentselection: store cell 'selected' state in the cells' attributes (diff)
selection: selection_cancel() now sets 'kind' to SELECTION_NONE
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/selection.c b/selection.c
index 1510210e..b9f4579e 100644
--- a/selection.c
+++ b/selection.c
@@ -126,6 +126,10 @@ foreach_selected(
case SELECTION_BLOCK:
return foreach_selected_block(term, cb, data);
+
+ case SELECTION_NONE:
+ assert(false);
+ return;
}
assert(false);
@@ -319,6 +323,7 @@ selection_cancel(struct terminal *term)
render_refresh(term);
}
+ term->selection.kind = SELECTION_NONE;
term->selection.start = (struct coord){-1, -1};
term->selection.end = (struct coord){-1, -1};
}