From: Daniel Carl Date: Mon, 24 Feb 2014 08:10:12 +0000 (+0100) Subject: Stop previous search before new one (#66). X-Git-Url: https://git.owens.tech/assets/favicon.png/assets/favicon.png/git?a=commitdiff_plain;h=2bdd6b501391b3ea559c02026678c19c177849c3;p=vimb.git 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. --- 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);