aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-27 17:58:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-27 17:58:44 +0000
commit2895f8fa107e9034f4d9b0731b1eddfd0cc9347b (patch)
treed577efcbfaae0ca95c572931da6c4bec6a8a4b2b
parentsearch: 'len' is unused in release builds (it's only used in an assert) (diff)
search: cancel selection and clear match stats when we don't match
-rw-r--r--search.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/search.c b/search.c
index 37ab5684..992de851 100644
--- a/search.c
+++ b/search.c
@@ -173,6 +173,11 @@ search_update(struct terminal *term)
start_col = term->cols - 1;
}
+
+ /* No match */
+ term->search.match = (struct coord){-1, -1};
+ term->search.match_len = 0;
+ selection_cancel(term);
}
void