From 312a4e8a649b0cb34f89249339b6d1946dc30440 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Mon, 9 Nov 2015 13:22:50 -0800 Subject: [PATCH] - try to fix backspace after doing a paste --- data/glest_game | 2 +- source/glest_game/game/chat_manager.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/glest_game b/data/glest_game index c3ef4617..bf04854a 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit c3ef4617d38e0062ab4835c5d5662a9580f1f095 +Subproject commit bf04854ade7cd0fc51483c857e590acfef4fbc26 diff --git a/source/glest_game/game/chat_manager.cpp b/source/glest_game/game/chat_manager.cpp index a6b61af1..b337dfec 100644 --- a/source/glest_game/game/chat_manager.cpp +++ b/source/glest_game/game/chat_manager.cpp @@ -104,7 +104,9 @@ bool ChatManager::textInput(std::string inputText) { string textToAdd=inputText.substr (0,maxpaste); if(editEnabled && (int)text.length() < maxTextLenAllowed) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - textCharLength.push_back(textToAdd.length()); + for(unsigned int idx = 0; idx < textToAdd.size(); ++idx) { + textCharLength.push_back(1); + } this->text +=textToAdd; updateAutoCompleteBuffer(); return true;