From 251545203baa65364e491ddbe71ab3f8080bfe25 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 22 Jul 2021 17:53:29 +0200 Subject: search: reset match state when selection is cancelled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While we’re in scrollback search mode, the selection may be cancelled (for example, if the application is scrolling out the selected text). Trying to e.g. extend the search selection after this has happened triggered a crash. This fixes it by simply resetting the search match state when the selection is cancelled. Closes #644 --- search.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'search.h') diff --git a/search.h b/search.h index 5db1610d..f4dfa5b9 100644 --- a/search.h +++ b/search.h @@ -11,3 +11,5 @@ void search_input( const xkb_keysym_t *raw_syms, size_t raw_count, uint32_t serial); void search_add_chars(struct terminal *term, const char *text, size_t len); + +void search_selection_cancelled(struct terminal *term); -- cgit v1.3