Further autocompletion fixes

Refactor code as splitting is now useless
This commit is contained in:
ORelio 2015-07-23 21:39:41 +02:00
parent c88d150976
commit 80b44228f8

View file

@ -171,9 +171,6 @@ namespace MinecraftClient
break; break;
case ConsoleKey.Tab: case ConsoleKey.Tab:
if (autocomplete_engine != null && buffer.Length > 0) if (autocomplete_engine != null && buffer.Length > 0)
{
string[] tmp = buffer.Split(' ');
if (tmp.Length > 0)
{ {
string word_autocomplete = autocomplete_engine.AutoComplete(buffer); string word_autocomplete = autocomplete_engine.AutoComplete(buffer);
if (!String.IsNullOrEmpty(word_autocomplete) && word_autocomplete != buffer) if (!String.IsNullOrEmpty(word_autocomplete) && word_autocomplete != buffer)
@ -182,7 +179,6 @@ namespace MinecraftClient
foreach (char c in word_autocomplete) { AddChar(c); } foreach (char c in word_autocomplete) { AddChar(c); }
} }
} }
}
break; break;
default: default:
if (k.KeyChar != 0) if (k.KeyChar != 0)