Diff of /scintilla/src/ScintillaBase.cxx [b645ec] .. [635b7c]  Maximize  Restore

  Switch to side-by-side view

--- a/scintilla/src/ScintillaBase.cxx
+++ b/scintilla/src/ScintillaBase.cxx
@@ -289,7 +289,7 @@
 
 void ScintillaBase::AutoCompleteCancel() {
 	if (ac.Active()) {
-		SCNotification scn = {0};
+		SCNotification scn = {};
 		scn.nmhdr.code = SCN_AUTOCCANCELLED;
 		scn.wParam = 0;
 		scn.listType = 0;
@@ -325,7 +325,7 @@
 	} else {
 		AutoCompleteMoveToCurrentWord();
 	}
-	SCNotification scn = {0};
+	SCNotification scn = {};
 	scn.nmhdr.code = SCN_AUTOCCHARDELETED;
 	scn.wParam = 0;
 	scn.listType = 0;
@@ -342,7 +342,7 @@
 
 	ac.Show(false);
 
-	SCNotification scn = {0};
+	SCNotification scn = {};
 	scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION;
 	scn.message = 0;
 	scn.wParam = listType;
@@ -434,7 +434,7 @@
 }
 
 void ScintillaBase::CallTipClick() {
-	SCNotification scn = {0};
+	SCNotification scn = {};
 	scn.nmhdr.code = SCN_CALLTIPCLICK;
 	scn.position = ct.clickPlace;
 	NotifyParent(scn);
@@ -503,6 +503,8 @@
 	int AllocateSubStyles(int styleBase, int numberStyles);
 	int SubStylesStart(int styleBase);
 	int SubStylesLength(int styleBase);
+	int StyleFromSubStyle(int subStyle);
+	int PrimaryStyleFromStyle(int style);
 	void FreeSubStyles();
 	void SetIdentifiers(int style, const char *identifiers);
 	int DistanceToSecondaryStyles();
@@ -678,6 +680,20 @@
 	return 0;
 }
 
+int LexState::StyleFromSubStyle(int subStyle) {
+	if (instance && (interfaceVersion >= lvSubStyles)) {
+		return static_cast<ILexerWithSubStyles *>(instance)->StyleFromSubStyle(subStyle);
+	}
+	return 0;
+}
+
+int LexState::PrimaryStyleFromStyle(int style) {
+	if (instance && (interfaceVersion >= lvSubStyles)) {
+		return static_cast<ILexerWithSubStyles *>(instance)->PrimaryStyleFromStyle(style);
+	}
+	return 0;
+}
+
 void LexState::FreeSubStyles() {
 	if (instance && (interfaceVersion >= lvSubStyles)) {
 		static_cast<ILexerWithSubStyles *>(instance)->FreeSubStyles();
@@ -983,6 +999,12 @@
 	case SCI_GETSUBSTYLESLENGTH:
 		return DocumentLexState()->SubStylesLength(wParam);
 
+	case SCI_GETSTYLEFROMSUBSTYLE:
+		return DocumentLexState()->StyleFromSubStyle(wParam);
+
+	case SCI_GETPRIMARYSTYLEFROMSTYLE:
+		return DocumentLexState()->PrimaryStyleFromStyle(wParam);
+
 	case SCI_FREESUBSTYLES:
 		DocumentLexState()->FreeSubStyles();
 		break;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks