aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ScintillaBase.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index e42b5dc65..cc02674b3 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -297,7 +297,7 @@ void ScintillaBase::AutoCompleteCharacterAdded(char ch) {
}
void ScintillaBase::AutoCompleteCharacterDeleted() {
- if (currentPos <= ac.posStart - ac.startLen) {
+ if (currentPos < ac.posStart - ac.startLen) {
ac.Cancel();
} else if (ac.cancelAtStartPos && (currentPos <= ac.posStart)) {
ac.Cancel();
@@ -314,6 +314,8 @@ void ScintillaBase::AutoCompleteCompleted() {
ac.lb->GetValue(item, selected, sizeof(selected));
}
ac.Cancel();
+ if (item == -1)
+ return;
if (listType > 0) {
userListSelected = selected;