From: Daniel Carl Date: Fri, 21 Apr 2017 09:45:32 +0000 (+0200) Subject: Fixed none printed :open .. on O. X-Git-Url: https://git.owens.tech/editable-focus.html/editable-focus.html/git?a=commitdiff_plain;h=7198464f2b83b67c0848b6a0db4283b07da96c95;p=vimb.git Fixed none printed :open .. on O. 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. --- diff --git a/src/command.c b/src/command.c index fdea708..1ffb109 100644 --- a/src/command.c +++ b/src/command.c @@ -41,11 +41,15 @@ gboolean command_search(Client *c, const Arg *arg) 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; }