1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-07 00:58:39 +02:00

Apply command review suggestions + minor cleanup

This commit is contained in:
Dydzio
2023-01-08 20:30:57 +01:00
parent 16d06827d6
commit 58fe0e6bd9
3 changed files with 22 additions and 29 deletions

View File

@ -1152,7 +1152,6 @@ void CInGameConsole::endEnteringText(bool processEnteredText)
if(processEnteredText)
{
std::string txt = enteredText.substr(0, enteredText.size()-1);
LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection());
previouslyEntered.push_back(txt);
if(txt.at(0) == '/')
@ -1161,6 +1160,8 @@ void CInGameConsole::endEnteringText(bool processEnteredText)
boost::thread clientCommandThread(ClientCommandManager::processCommand, txt.substr(1), true);
clientCommandThread.detach();
}
else
LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection());
}
enteredText.clear();