If the input was filled programmatically and the mode where switched the
already filled input was cleaned by the attempt to stop possible search.
So now the input is only cleared if there is really an active search.
fc = webkit_web_view_get_find_controller(c->webview);
if (arg->i == 0) {
+ /* Clear the input only if the search is active. */
+ if (c->state.search.active) {
+ vb_echo(c, MSG_NORMAL, FALSE, "");
+ }
webkit_find_controller_search_finish(fc);
c->state.search.matches = 0;
c->state.search.active = FALSE;
vb_statusbar_update(c);
- vb_echo(c, MSG_NORMAL, FALSE, "");
+
return TRUE;
}