From 2895f8fa107e9034f4d9b0731b1eddfd0cc9347b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 27 Aug 2019 19:58:44 +0200 Subject: [PATCH] search: cancel selection and clear match stats when we don't match --- search.c | 5 +++++ 1 file changed, 5 insertions(+) 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