[PATCH 3/3] Clear input line when switching to vi mode
If vi_mode is set to 1 and the user leaves chat mode, clear the input
line. Existing text on the input line cannot be sent as a message and
will also not be evaluated as a vi command in this situation, so leaving
the text on the input line would be confusing.
--- a/mcabber/mcabber/screen.c Fri Jul 24 02:37:07 2015 +0200
+++ b/mcabber/mcabber/screen.c Fri Jul 24 02:52:23 2015 +0200
@@ -3807,8 +3807,11 @@
void readline_disable_chat_mode(guint show_roster)
{
scr_check_auto_away(TRUE);
- if (chatmode)
+ if (chatmode) {
scr_buffer_readmark(TRUE);
+ if (settings_opt_get_int("vi_mode"))
+ clear_inputline();
+ }
currentWindow = NULL;
chatmode = FALSE;
if (current_buddy)