From 7198464f2b83b67c0848b6a0db4283b07da96c95 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Fri, 21 Apr 2017 11:45:32 +0200 Subject: [PATCH] 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. --- src/command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.20.1