annotate src/qscintilla-2-bang-fix.patch @ 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
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3434
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
1 diff -ur QScintilla-gpl-2.8.orig/lexers/LexMatlab.cpp QScintilla-gpl-2.8.bang/lexers/LexMatlab.cpp
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
2 --- QScintilla-gpl-2.8.orig/lexers/LexMatlab.cpp 2014-01-18 09:19:16 -0500
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
3 +++ QScintilla-gpl-2.8.bang/lexers/LexMatlab.cpp 2014-01-18 17:09:25 -0500
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
4 @@ -57,7 +57,7 @@
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
5 static void ColouriseMatlabOctaveDoc(
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
6 unsigned int startPos, int length, int initStyle,
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
7 WordList *keywordlists[], Accessor &styler,
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
8 - bool (*IsCommentChar)(int)) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
9 + bool (*IsCommentChar)(int), bool ismatlab) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
10
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
11 WordList &keywords = *keywordlists[0];
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
12
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
13 @@ -199,7 +199,11 @@
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
14 styler.SetLineState(curLine, commentDepth);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
15 sc.SetState(SCE_MATLAB_COMMENT);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
16 } else if (sc.ch == '!' && sc.chNext != '=' ) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
17 - sc.SetState(SCE_MATLAB_COMMAND);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
18 + if (ismatlab) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
19 + sc.SetState(SCE_MATLAB_COMMAND);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
20 + } else {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
21 + sc.SetState(SCE_MATLAB_OPERATOR);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
22 + }
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
23 } else if (sc.ch == '\'') {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
24 if (transpose) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
25 sc.SetState(SCE_MATLAB_OPERATOR);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
26 @@ -229,12 +233,12 @@
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
27
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
28 static void ColouriseMatlabDoc(unsigned int startPos, int length, int initStyle,
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
29 WordList *keywordlists[], Accessor &styler) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
30 - ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsMatlabCommentChar);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
31 + ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsMatlabCommentChar, true);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
32 }
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
33
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
34 static void ColouriseOctaveDoc(unsigned int startPos, int length, int initStyle,
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
35 WordList *keywordlists[], Accessor &styler) {
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
36 - ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsOctaveCommentChar);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
37 + ColouriseMatlabOctaveDoc(startPos, length, initStyle, keywordlists, styler, IsOctaveCommentChar, false);
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
38 }
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
39
7864014bc84a Add qscintilla patch for ! operator (Bug #41270)
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
40 static void FoldMatlabOctaveDoc(unsigned int startPos, int length, int,