Mon, 15 Dec 2014 10:51:56 +0200
- add support for SVRC_TOOMANYTABCOMPLETES
--- a/sources/interface.cpp Mon Dec 15 10:31:52 2014 +0200 +++ b/sources/interface.cpp Mon Dec 15 10:51:56 2014 +0200 @@ -945,12 +945,15 @@ // ------------------------------------------------------------------------------------------------- // FUNCTION -Interface::tab_complete (const String& part, const String& complete) -> void +Interface::tab_complete (const String& part, String complete) -> void { String& input = mutable_current_input(); if (input.starts_with (part)) { + if (input[part.length()] != ' ') + complete += ' '; + input.replace (0, part.length(), complete); g_cursor = complete.length(); g_needInputRender = true;
--- a/sources/interface.h Mon Dec 15 10:31:52 2014 +0200 +++ b/sources/interface.h Mon Dec 15 10:51:56 2014 +0200 @@ -41,5 +41,5 @@ FUNCTION update_statusbar() -> void; FUNCTION connect (String address, String password) -> void; FUNCTION need_refresh() -> void; - FUNCTION tab_complete (const String& part, const String& complete) -> void; + FUNCTION tab_complete (const String& part, String complete) -> void; };
--- a/sources/network/rconsession.cpp Mon Dec 15 10:31:52 2014 +0200 +++ b/sources/network/rconsession.cpp Mon Dec 15 10:51:56 2014 +0200 @@ -188,6 +188,14 @@ process_server_updates (packet); break; + case SVRC_TOOMANYTABCOMPLETES: + { + unsigned int numCompletions = packet.read_short(); + print ("%1 completions for '%2'.\n", + int (numCompletions), m_lastTabComplete); + } + break; + case SVRC_TABCOMPLETE: { StringList completes;
--- a/sources/network/rconsession.h Mon Dec 15 10:31:52 2014 +0200 +++ b/sources/network/rconsession.h Mon Dec 15 10:51:56 2014 +0200 @@ -52,6 +52,7 @@ SVRC_MESSAGE, SVRC_UPDATE, SVRC_TABCOMPLETE, + SVRC_TOOMANYTABCOMPLETES, }; // -------------------------------------------------------------------------------------------------