mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix tab autocompletion when no result is found
When no result is found, tab-complete result should be ignored. Bug report by c0dei.
This commit is contained in:
parent
546119a334
commit
1e801ad415
1 changed files with 1 additions and 2 deletions
|
|
@ -175,9 +175,8 @@ namespace MinecraftClient
|
||||||
string[] tmp = buffer.Split(' ');
|
string[] tmp = buffer.Split(' ');
|
||||||
if (tmp.Length > 0)
|
if (tmp.Length > 0)
|
||||||
{
|
{
|
||||||
string word_tocomplete = tmp[tmp.Length - 1];
|
|
||||||
string word_autocomplete = autocomplete_engine.AutoComplete(buffer);
|
string word_autocomplete = autocomplete_engine.AutoComplete(buffer);
|
||||||
if (!String.IsNullOrEmpty(word_autocomplete) && word_autocomplete != word_tocomplete)
|
if (!String.IsNullOrEmpty(word_autocomplete) && word_autocomplete != buffer)
|
||||||
{
|
{
|
||||||
while (buffer.Length > 0 && buffer[buffer.Length - 1] != ' ') { RemoveOneChar(); }
|
while (buffer.Length > 0 && buffer[buffer.Length - 1] != ' ') { RemoveOneChar(); }
|
||||||
foreach (char c in word_autocomplete) { AddChar(c); }
|
foreach (char c in word_autocomplete) { AddChar(c); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue