From 17f15dfec3f6c4d21d1d3d26db94524789b3e4e6 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Wed, 8 Jan 2014 00:45:28 +0100 Subject: [PATCH] Reset inputbox style if command mode is started or box cleared. If there was shown a error message in inputbox and the user starts to enter a new command or presses , the inputbox keeps red colored until the timeout reset the style back to normal. This patch uses the vb_echo* functions to put the text into the input box, that will set the style explicit to 'normal'. --- src/mode.c | 2 +- src/normal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mode.c b/src/mode.c index f7e6d82..7146609 100644 --- a/src/mode.c +++ b/src/mode.c @@ -110,7 +110,7 @@ void mode_enter_prompt(char id, const char *prompt, gboolean print_prompt) if (print_prompt) { /* set it after the mode was entered so that the modes input change * event listener could grep the new prompt */ - vb_set_input_text(vb.state.prompt); + vb_echo_force(VB_MSG_NORMAL, false, vb.state.prompt); } } diff --git a/src/normal.c b/src/normal.c index a401f41..b0bdd1e 100644 --- a/src/normal.c +++ b/src/normal.c @@ -342,8 +342,8 @@ static char *transchar(int c) static VbResult normal_clear_input(const NormalCmdInfo *info) { - vb_set_input_text(""); gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview)); + vb_echo(VB_MSG_NORMAL, false, ""); command_search(&((Arg){0})); return RESULT_COMPLETE; -- 2.20.1