# HG changeset patch # User Holger Weiß # Date 1437699143 -7200 # Node ID 7afb9a0c6409089c88097c6199a9079e756dbb28 # Parent 5b1a63dc2b1a172967cab7410354942fca3f13cc [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. diff -r 5b1a63dc2b1a -r 7afb9a0c6409 mcabber/mcabber/screen.c --- 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)