mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Further autocompletion fixes
Refactor code as splitting is now useless
This commit is contained in:
parent
c88d150976
commit
80b44228f8
1 changed files with 4 additions and 8 deletions
|
|
@ -172,15 +172,11 @@ namespace MinecraftClient
|
|||
case ConsoleKey.Tab:
|
||||
if (autocomplete_engine != null && buffer.Length > 0)
|
||||
{
|
||||
string[] tmp = buffer.Split(' ');
|
||||
if (tmp.Length > 0)
|
||||
string word_autocomplete = autocomplete_engine.AutoComplete(buffer);
|
||||
if (!String.IsNullOrEmpty(word_autocomplete) && word_autocomplete != buffer)
|
||||
{
|
||||
string word_autocomplete = autocomplete_engine.AutoComplete(buffer);
|
||||
if (!String.IsNullOrEmpty(word_autocomplete) && word_autocomplete != buffer)
|
||||
{
|
||||
while (buffer.Length > 0 && buffer[buffer.Length - 1] != ' ') { RemoveOneChar(); }
|
||||
foreach (char c in word_autocomplete) { AddChar(c); }
|
||||
}
|
||||
while (buffer.Length > 0 && buffer[buffer.Length - 1] != ' ') { RemoveOneChar(); }
|
||||
foreach (char c in word_autocomplete) { AddChar(c); }
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue