From a73898d44163c2c678a4a8ca9a04fcf28ac46ed1 Mon Sep 17 00:00:00 2001 From: Alexander Fast Date: Thu, 21 Aug 2014 13:05:04 +0200 Subject: [PATCH] Fixes double auto completion. Pressing tab twice would auto complete (the same name) twice. Auto completion is now disabled when last character in sentence is a space. --- OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index 25ee218c67..4d444d5d49 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -785,6 +785,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (chatText == null || string.IsNullOrEmpty(chatText.Text)) return false; + if (chatText.Text.LastOrDefault() == ' ') + return false; + var suggestion = ""; var oneWord = !chatText.Text.Contains(' '); var toComplete = oneWord