From f1e44000419a69cd85ef7a25cf0ccf7552c128e4 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 5 Aug 2013 23:34:18 +0200 Subject: [PATCH] Fixed non working hinting mode for ;o and ;t. If the hint-input-* commands where used and the hinted elements where selected by number, the input box was cleared immediately after it where filled, because of the to late deactivation of hint mode in command_input. --- src/command.c | 4 ++-- src/hints.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command.c b/src/command.c index 0f64951..da6dd5a 100644 --- a/src/command.c +++ b/src/command.c @@ -318,6 +318,8 @@ gboolean command_input(const Arg *arg) { const char *url; + vb_set_mode(VB_MODE_COMMAND, false); + /* add current url if requested */ if (VB_INPUT_CURRENT_URI == arg->i && (url = GET_URI())) { /* append the current url to the input message */ @@ -328,8 +330,6 @@ gboolean command_input(const Arg *arg) vb_echo_force(VB_MSG_NORMAL, false, "%s", arg->s); } - vb_set_mode(VB_MODE_COMMAND, false); - return true; } diff --git a/src/hints.c b/src/hints.c index c9d61e2..ebf8ac8 100644 --- a/src/hints.c +++ b/src/hints.c @@ -147,7 +147,7 @@ static void run_script(char *js) vb.gui.webview, "hovering-over-link", NULL, *(value + 5) == '\0' ? NULL : (value + 5) ); } else if (!strncmp(value, "DONE:", 5)) { - vb_set_mode(VB_MODE_NORMAL, true); + vb_set_mode(VB_MODE_NORMAL, false); } else if (!strncmp(value, "INSERT:", 7)) { vb_set_mode(VB_MODE_INSERT, false); if (HINTS_GET_TYPE(mode) == HINTS_TYPE_EDITABLE) { -- 2.20.1