diff options
| -rw-r--r-- | src/ScintillaBase.cxx | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 9430a54e0..d42dfc7ff 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -215,7 +215,8 @@ void ScintillaBase::AutoCompleteInsert(Position startPos, int removeLen, const c  				int positionInsert = sel.Range(r).Start().Position();  				positionInsert = InsertSpace(positionInsert, sel.Range(r).caret.VirtualSpace());  				if (positionInsert - removeLen >= 0) { -					pdoc->DeleteChars(positionInsert - removeLen, removeLen); +					positionInsert -= removeLen; +					pdoc->DeleteChars(positionInsert, removeLen);  				}  				const int lengthInserted = pdoc->InsertString(positionInsert, text, textLen);  				if (lengthInserted > 0) { | 
