SF.net SVN: geany: [2662] trunk/scintilla

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jun 8 14:38:02 UTC 2008


Revision: 2662
          http://geany.svn.sourceforge.net/geany/?rev=2662&view=rev
Author:   eht16
Date:     2008-06-08 07:38:01 -0700 (Sun, 08 Jun 2008)

Log Message:
-----------
Backport AutoCCancelled event implementation from Scintilla CVS.

Modified Paths:
--------------
    trunk/scintilla/ScintillaBase.cxx
    trunk/scintilla/include/Scintilla.h
    trunk/scintilla/include/Scintilla.iface

Modified: trunk/scintilla/ScintillaBase.cxx
===================================================================
--- trunk/scintilla/ScintillaBase.cxx	2008-06-08 14:19:49 UTC (rev 2661)
+++ trunk/scintilla/ScintillaBase.cxx	2008-06-08 14:38:01 UTC (rev 2662)
@@ -173,7 +173,7 @@
 			return 0;
 
 		default:
-			ac.Cancel();
+			AutoCompleteCancel();
 		}
 	}
 
@@ -287,6 +287,13 @@
 }
 
 void ScintillaBase::AutoCompleteCancel() {
+	if (ac.Active()) {
+		SCNotification scn = {0};
+		scn.nmhdr.code = SCN_AUTOCCANCELLED;
+		scn.wParam = 0;
+		scn.listType = 0;
+		NotifyParent(scn);
+	}
 	ac.Cancel();
 }
 
@@ -308,7 +315,7 @@
 	if (ac.IsFillUpChar(ch)) {
 		AutoCompleteCompleted();
 	} else if (ac.IsStopChar(ch)) {
-		ac.Cancel();
+		AutoCompleteCancel();
 	} else {
 		AutoCompleteMoveToCurrentWord();
 	}
@@ -316,9 +323,9 @@
 
 void ScintillaBase::AutoCompleteCharacterDeleted() {
 	if (currentPos < ac.posStart - ac.startLen) {
-		ac.Cancel();
+		AutoCompleteCancel();
 	} else if (ac.cancelAtStartPos && (currentPos <= ac.posStart)) {
-		ac.Cancel();
+		AutoCompleteCancel();
 	} else {
 		AutoCompleteMoveToCurrentWord();
 	}
@@ -331,7 +338,7 @@
 	if (item != -1) {
 		ac.lb->GetValue(item, selected, sizeof(selected));
 	} else {
-		ac.Cancel();
+		AutoCompleteCancel();
 		return;
 	}
 
@@ -378,7 +385,7 @@
 }
 
 void ScintillaBase::CallTipShow(Point pt, const char *defn) {
-	AutoCompleteCancel();
+	ac.Cancel();
 	pt.y += vs.lineHeight;
 	// If container knows about STYLE_CALLTIP then use it in place of the
 	// STYLE_DEFAULT for the face name, size and character set. Also use it
@@ -518,7 +525,7 @@
 		break;
 
 	case SCI_AUTOCCANCEL:
-		AutoCompleteCancel();
+		ac.Cancel();
 		break;
 
 	case SCI_AUTOCACTIVE:

Modified: trunk/scintilla/include/Scintilla.h
===================================================================
--- trunk/scintilla/include/Scintilla.h	2008-06-08 14:19:49 UTC (rev 2661)
+++ trunk/scintilla/include/Scintilla.h	2008-06-08 14:38:01 UTC (rev 2662)
@@ -750,6 +750,7 @@
 #define SCN_AUTOCSELECTION 2022
 #define SCN_INDICATORCLICK 2023
 #define SCN_INDICATORRELEASE 2024
+#define SCN_AUTOCCANCELLED 2025
 /*--Autogenerated -- end of section automatically generated from Scintilla.iface */
 
 /* These structures are defined to be exactly the same shape as the Win32

Modified: trunk/scintilla/include/Scintilla.iface
===================================================================
--- trunk/scintilla/include/Scintilla.iface	2008-06-08 14:19:49 UTC (rev 2661)
+++ trunk/scintilla/include/Scintilla.iface	2008-06-08 14:38:01 UTC (rev 2662)
@@ -3322,6 +3322,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)
 
 cat Deprecated
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list