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.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index e6c82f41..1ff4b3b6 100644 --- a/terminal.h +++ b/terminal.h @@ -514,6 +514,11 @@ struct terminal { bool view_followed_offset; struct coord match; size_t match_len; + + struct { + wchar_t *buf; + size_t len; + } last; } search; struct wayland *wl; -- cgit v1.3