diff options
author | Daniel Carl <danielcarl@gmx.de> | 2014-02-24 09:10:12 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2014-02-24 09:10:12 +0100 |
commit | 2bdd6b501391b3ea559c02026678c19c177849c3 (patch) | |
tree | 8034675999ad6e40da09c31b18b787abd0f2d6cc /src/normal.c | |
parent | f7ce3ee5519a6e1b11c40adbfb2b36608e64a030 (diff) |
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.
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |