Clear search on stopping incsearch.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 28 Apr 2018 22:03:59 +0000 (00:03 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 28 Apr 2018 22:03:59 +0000 (00:03 +0200)
The search highlight was not removed if incsearch was enabled and the
search not commited by <CR> but left by <Esc>.

src/ex.c

index 98da593..a8acc7b 100644 (file)
--- a/src/ex.c
+++ b/src/ex.c
@@ -242,6 +242,9 @@ void ex_leave(Client *c)
 {
     completion_clean(c);
     hints_clear(c);
+    if (c->config.incsearch) {
+        command_search(c, &((Arg){0, NULL}), FALSE);
+    }
 }
 
 /**