changeset 3434:7864014bc84a

Add qscintilla patch for ! operator (Bug #41270) * src/qscintilla-2-bang-fix.patch: New file. * dist-files.mk: added qscintilla-2-bang-fix.patch.
author John Donoghue <john.donoghue@ieee.org>
date Sun, 19 Jan 2014 17:37:35 -0500
parents 4779ae33e544
children 9fcc72373e24
files dist-files.mk src/qscintilla-2-bang-fix.patch
diffstat 2 files changed, 41 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sun Jan 19 10:11:30 2014 -0500
+++ b/dist-files.mk	Sun Jan 19 17:37:35 2014 -0500
@@ -486,6 +486,7 @@
   qrupdate-1-fixes.patch \
   qrupdate.mk \
   qscintilla-1-fixes.patch \
+  qscintilla-2-bang-fix.patch \
   qscintilla.mk \
   qt-1-cherrypicks.patch \
   qt-1-pcre.patch \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/qscintilla-2-bang-fix.patch	Sun Jan 19 17:37:35 2014 -0500
@@ -0,0 +1,40 @@
+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,