bugfix for ctrl-v
This commit is contained in:
parent
2b1518103a
commit
07f46f3f7b
|
@ -101,10 +101,11 @@ bool ChatManager::textInput(std::string inputText) {
|
||||||
int maxTextLenAllowed = (customCB != NULL ? this->maxCustomTextLength : maxTextLenght);
|
int maxTextLenAllowed = (customCB != NULL ? this->maxCustomTextLength : maxTextLenght);
|
||||||
int maxpaste=0;
|
int maxpaste=0;
|
||||||
maxpaste=maxTextLenAllowed-text.length();
|
maxpaste=maxTextLenAllowed-text.length();
|
||||||
|
string textToAdd=inputText.substr (0,maxpaste);
|
||||||
if(editEnabled && (int)text.length() < maxTextLenAllowed) {
|
if(editEnabled && (int)text.length() < maxTextLenAllowed) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
textCharLength.push_back(inputText.length());
|
textCharLength.push_back(textToAdd.length());
|
||||||
this->text +=inputText.substr (0,maxpaste);
|
this->text +=textToAdd;
|
||||||
updateAutoCompleteBuffer();
|
updateAutoCompleteBuffer();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue