Go to correct position after word completion

Closes #2675, Closes #2802
This commit is contained in:
dail8859 2017-01-18 17:57:41 -05:00
parent 6e3726950c
commit f2756c2286

View File

@ -342,8 +342,8 @@ bool AutoCompletion::showWordComplete(bool autoInsert)
if (wordArray.size() == 1 && autoInsert) if (wordArray.size() == 1 && autoInsert)
{ {
_pEditView->replaceTargetRegExMode(wordArray[0].c_str(), startPos, curPos); int replacedLength = _pEditView->replaceTargetRegExMode(wordArray[0].c_str(), startPos, curPos);
_pEditView->execute(SCI_GOTOPOS, startPos + wordArray[0].length()); _pEditView->execute(SCI_GOTOPOS, startPos + replacedLength);
return true; return true;
} }