From 84f0affe6ab0a7fad2c03ec0d653b01f63ca3813 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 2 Jan 2009 07:34:52 +0000 Subject: Notification for deleting a character while an autocompletion is active. By Sergey Kishchenko. --- doc/ScintillaDoc.html | 7 ++++++- include/Scintilla.h | 1 + include/Scintilla.iface | 1 + src/ScintillaBase.cxx | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index ee5d152b4..ffa409f71 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -4827,6 +4827,7 @@ struct SCNotification { SCN_CALLTIPCLICK
SCN_AUTOCSELECTION
SCN_AUTOCCANCELLED
+ SCN_AUTOCCHARDELETED

The following SCI_* messages are associated with these notifications:

@@ -5464,7 +5465,11 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next

SCN_AUTOCCANCELLED
The user has cancelled an autocompletion list. - There is no other information in SCNotification. + There is no other information in SCNotification.

+ +

SCN_AUTOCCHARDELETED
+ The user deleted a character while autocompletion list was active. + There is no other information in SCNotification.

GTK+

On GTK+, the following functions create a Scintilla widget, communicate with it and allow diff --git a/include/Scintilla.h b/include/Scintilla.h index 7dca10ae4..2b2f28d5a 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -754,6 +754,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCN_INDICATORCLICK 2023 #define SCN_INDICATORRELEASE 2024 #define SCN_AUTOCCANCELLED 2025 +#define SCN_AUTOCCHARDELETED 2026 //--Autogenerated -- end of section automatically generated from Scintilla.iface // These structures are defined to be exactly the same shape as the Win32 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 76e46e9db..35884456b 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -3426,6 +3426,7 @@ evt void AutoCSelection=2022(string text) evt void IndicatorClick=2023(int modifiers, int position) evt void IndicatorRelease=2024(int modifiers, int position) evt void AutoCCancelled=2025(void) +evt void AutoCCharDeleted=2026(void) cat Deprecated diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index d1d9ad4cb..d2b6a3ed8 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -329,6 +329,11 @@ void ScintillaBase::AutoCompleteCharacterDeleted() { } else { AutoCompleteMoveToCurrentWord(); } + SCNotification scn = {0}; + scn.nmhdr.code = SCN_AUTOCCHARDELETED; + scn.wParam = 0; + scn.listType = 0; + NotifyParent(scn); } void ScintillaBase::AutoCompleteCompleted() { -- cgit v1.2.3