From: Daniel Carl Date: Fri, 21 Apr 2017 09:05:05 +0000 (+0200) Subject: Clear input after load commited during search. X-Git-Url: https://git.owens.tech/assets/static/gitweb.css/assets/static/gitweb.css/git?a=commitdiff_plain;h=17556517c68e070d6680de4a5cbf9b4d410aadda;p=vimb.git Clear input after load commited during search. If a new page is opened during search, the search string was still present in the input box even if the searching is paused in this case. So now clear the input box and stop searching in case of a new page load. --- diff --git a/src/command.c b/src/command.c index 4913ddc..fdea708 100644 --- a/src/command.c +++ b/src/command.c @@ -45,6 +45,7 @@ gboolean command_search(Client *c, const Arg *arg) c->state.search.matches = 0; c->state.search.active = FALSE; vb_statusbar_update(c); + vb_echo(c, MSG_NORMAL, FALSE, ""); return TRUE; } diff --git a/src/main.c b/src/main.c index 85b3c53..76b8779 100644 --- a/src/main.c +++ b/src/main.c @@ -28,6 +28,7 @@ #include #include "ascii.h" +#include "command.h" #include "completion.h" #include "config.h" #include "ex.h" @@ -1143,6 +1144,9 @@ static void on_webview_load_changed(WebKitWebView *webview, /* clear possible set marks */ marks_clear(c); + /* Unset possible last search. */ + command_search(c, &((Arg){0})); + break; case WEBKIT_LOAD_FINISHED: