aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/Scintilla.h2
-rw-r--r--include/Scintilla.iface7
-rw-r--r--src/AutoComplete.cxx2
-rw-r--r--src/ScintillaBase.cxx7
4 files changed, 17 insertions, 1 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index e53931e0f..c452d3f20 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -208,6 +208,8 @@ void Scintilla_RegisterClasses(HINSTANCE hInstance);
#define SCI_AUTOCSETSEPARATOR SCI_START + 106
#define SCI_AUTOCGETSEPARATOR SCI_START + 107
#define SCI_AUTOCSELECT SCI_START + 108
+#define SCI_AUTOCSETCANCELATSTART SCI_START + 110
+#define SCI_AUTOCGETCANCELATSTART SCI_START + 111
#define SCI_GETTABWIDTH SCI_START + 121
#define SCI_SETINDENT SCI_START + 122
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index ce52f1c70..df63dd387 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -422,6 +422,13 @@ get int AutoCGetSeparator=2107(,)
# Select the item in the auto-completion list that starts with a string.
fun void AutoCSelect=2108(, string text)
+# Should the auto-completion list be cancelled if the user backspaces to a
+# position before where the box was created.
+set void AutoCSetCancelAtStart=2110(bool cancel,)
+
+# Retrieve whether auto-completion cancelled by backspacing before start.
+get bool AutoCGetCancelAtStart=2111(,)
+
# Set the number of spaces used for one level of indentation.
set void SetIndent=2122(int indentSize,)
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx
index 00a3a75fc..d45ab27a6 100644
--- a/src/AutoComplete.cxx
+++ b/src/AutoComplete.cxx
@@ -16,7 +16,7 @@ AutoComplete::AutoComplete() {
posStart = 0;
strcpy(stopChars, "");
separator = ' ';
- cancelAtStartPos = false;
+ cancelAtStartPos = true;
}
AutoComplete::~AutoComplete() {
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index f14426969..bf1b28394 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -351,6 +351,13 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
case SCI_AUTOCSELECT:
ac.Select(reinterpret_cast<char *>(lParam));
break;
+
+ case SCI_AUTOCSETCANCELATSTART:
+ ac.cancelAtStartPos = wParam;
+ break;
+
+ case SCI_AUTOCGETCANCELATSTART:
+ return ac.cancelAtStartPos;
case SCI_CALLTIPSHOW: {
AutoCompleteCancel();