aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2004-04-14 22:03:56 +0000
committernyamatongwe <devnull@localhost>2004-04-14 22:03:56 +0000
commitc247ff6b1a2ae626afbff5ed6062736ac359b007 (patch)
tree8a59821f0d99b46594a0d42681ba4018455d4d2b
parent094a3e3c1133a67417697f4303166834fa1de9c7 (diff)
downloadscintilla-mirror-c247ff6b1a2ae626afbff5ed6062736ac359b007.tar.gz
Patch from Trent Mick.
Prevent autocompletion from deleting prefix when actioned with no choice selected. Cancel autocompletion when backspacing beyond the start position rather than to the start position.
-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;