From 739e7d76b4b70da91c50a53026a83d382dd73bae Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 27 Jan 2022 18:36:28 +0100 Subject: search: remember last searched-for string between searches Regardless of how we exit search mode (commit or cancel), the search string is remembered. The next time we enter search mode, the last searched-for string will be used when searching for the next/prev match (ctrl+r, ctrl+s), and the search query is empty. --- terminal.c | 1 + 1 file changed, 1 insertion(+) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index c639d3d1..84a43290 100644 --- a/terminal.c +++ b/terminal.c @@ -1638,6 +1638,7 @@ term_destroy(struct terminal *term) &term->custom_glyphs.legacy, GLYPH_LEGACY_COUNT); free(term->search.buf); + free(term->search.last.buf); if (term->render.workers.threads != NULL) { for (size_t i = 0; i < term->render.workers.count; i++) { -- cgit v1.3