sources/interface.cpp

changeset 116
552909484712
parent 115
bb7ef7c33dad
child 117
39e05a6ba8d7
--- a/sources/interface.cpp	Mon Jan 11 02:14:33 2016 +0200
+++ b/sources/interface.cpp	Mon Jan 11 02:26:23 2016 +0200
@@ -830,13 +830,11 @@
 			if (current_input()[0] == '/')
 			{
 				handle_command(current_input());
-				InputHistory.insert (0, "");
-				NeedInputRender = true;
+				flush_input();
 			}
 			else if (Session.send_command (current_input()))
 			{
-				InputHistory.insert (0, "");
-				NeedInputRender = true;
+				flush_input();
 			}
 			break;
 		}
@@ -1116,4 +1114,13 @@
 	Title.sprintf (APPNAME " %s (%s)", full_version_string(), changeset_date_string());
 }
 
+// -------------------------------------------------------------------------------------------------
+//
+void Interface::flush_input()
+{
+	InputHistory.insert (0, "");
+	InputCursor = 0;
+	NeedInputRender = true;
+}
+
 END_ZFC_NAMESPACE

mercurial