view src/qscintilla-2-bang-fix.patch @ 3725:2acaa9943159

qscintilla: update 2.8.4 * src/qscintilla.mk: update to version and checksum for 2.8.4
author John Donoghue
date Mon, 20 Oct 2014 11:01:00 -0400
parents 7864014bc84a
children
line wrap: on
line source

diff -ur QScintilla-gpl-2.8.orig/lexers/LexMatlab.cpp QScintilla-gpl-2.8.bang/lexers/LexMatlab.cpp
--- QScintilla-gpl-2.8.orig/lexers/LexMatlab.cpp	2014-01-18 09:19:16 -0500
+++ QScintilla-gpl-2.8.bang/lexers/LexMatlab.cpp	2014-01-18 17:09:25 -0500
@@ -57,7 +57,7 @@
 static void ColouriseMatlabOctaveDoc(
             unsigned int startPos, int length, int initStyle,
             WordList *keywordlists[], Accessor &styler,
-            bool (*IsCommentChar)(int)) {
+            bool (*IsCommentChar)(int), bool ismatlab) {
 
 	WordList &keywords = *keywordlists[0];
 
@@ -199,7 +199,11 @@
 				styler.SetLineState(curLine, commentDepth);
 				sc.SetState(SCE_MATLAB_COMMENT);
 			} else if (sc.ch == '!' && sc.chNext != '=' ) {
-				sc.SetState(SCE_MATLAB_COMMAND);
+                                if (ismatlab) {
+				  sc.SetState(SCE_MATLAB_COMMAND);
+                                } else {
+				  sc.SetState(SCE_MATLAB_OPERATOR);
+                                }
 			} else if (sc.ch == '\'') {
 				if (transpose) {
 					sc.SetState(SCE_MATLAB_OPERATOR);
@@ -229,12 +233,12 @@
 
 static void ColouriseMatlabDoc(unsigned int startPos, int length, int initStyle,
                                WordList *keywordlists[], Accessor &styler) {
-	ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsMatlabCommentChar);
+	ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsMatlabCommentChar, true);
 }
 
 static void ColouriseOctaveDoc(unsigned int startPos, int length, int initStyle,
                                WordList *keywordlists[], Accessor &styler) {
-	ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsOctaveCommentChar);
+	ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsOctaveCommentChar, false);
 }
 
 static void FoldMatlabOctaveDoc(unsigned int startPos, int length, int,