# HG changeset patch # User Teemu Piippo # Date 1452471983 -7200 # Node ID 55290948471263e04cc2eb0c100fa8184d8d30b4 # Parent bb7ef7c33dad54f3f593fde22b013398d096af27 Fixed: sending a message from earlier history did not flush to a new input line, instead just up a single level in history diff -r bb7ef7c33dad -r 552909484712 sources/interface.cpp --- 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 diff -r bb7ef7c33dad -r 552909484712 sources/interface.h --- a/sources/interface.h Mon Jan 11 02:14:33 2016 +0200 +++ b/sources/interface.h Mon Jan 11 02:26:23 2016 +0200 @@ -111,6 +111,7 @@ int find_previous_word(); int find_next_word(); void reset_title(); + void flush_input(); }; END_ZFC_NAMESPACE \ No newline at end of file