From 2bdd6b501391b3ea559c02026678c19c177849c3 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 24 Feb 2014 09:10:12 +0100 Subject: [PATCH] Stop previous search before new one (#66). If there is an active search with highlighted matches and the user uses `#` or `*` to start a new search for marked text, the old hightlights where kept but the search uses the marked text. Now a possible previous search is stopped before the new one is started. --- src/normal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/normal.c b/src/normal.c index acb03a6..e69f13e 100644 --- a/src/normal.c +++ b/src/normal.c @@ -724,6 +724,9 @@ static VbResult normal_search_selection(const NormalCmdInfo *info) } count = (info->count > 0) ? info->count : 1; + /* stopp possible existing search and the search highlights before + * starting the new search query */ + command_search(&((Arg){0})); command_search(&((Arg){info->key == '*' ? count : -count, query})); g_free(query); -- 2.20.1