aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2004-04-14 22:03:56 +0000
committernyamatongwe <unknown>2004-04-14 22:03:56 +0000
commit5305dc49182acef1574427bb57ad24025967738d (patch)
tree8a59821f0d99b46594a0d42681ba4018455d4d2b
parentc258d8c3005c86f9016db52dbedd1a6c6cff6f66 (diff)
downloadscintilla-mirror-5305dc49182acef1574427bb57ad24025967738d.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;