aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-16 09:00:09 -0400
committerKen Moore <ken@pcbsd.org>2016-09-16 09:00:09 -0400
commit2c2e23b4f48b7c631e00e774c01ec73c49ef5039 (patch)
tree30972508399cfc988f4d18246187efa2bf0ac5a6
parentAnother quick fix for the menu script - ensure the open directory option is a... (diff)
downloadlumina-2c2e23b4f48b7c631e00e774c01ec73c49ef5039.tar.gz
lumina-2c2e23b4f48b7c631e00e774c01ec73c49ef5039.tar.bz2
lumina-2c2e23b4f48b7c631e00e774c01ec73c49ef5039.zip
Fix up the highlighting of characters where the start character is already within a different highlight block (do not stack them - that start char was already handled and is off limits).
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/tests/test.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
index 781ff65d..f834e275 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
+++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
@@ -101,7 +101,7 @@ protected:
if(splitactive>=0 || index<start){ continue; } //skip this one - falls within a multi-line pattern above
while(index>=0){
int len = patt.matchedLength();
- setFormat(index, len, rules[i].format);
+ if(format(index)==currentBlock().charFormat()){ setFormat(index, len, rules[i].format); } //only apply highlighting if not within a section already
index = patt.indexIn(text, index+len); //go to the next match
}
}//end loop over normal (single-line) patterns
diff --git a/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp b/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp
index 1b50e302..e135227d 100644
--- a/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/tests/test.cpp
@@ -13,3 +13,6 @@ comment */
stuff
some /*single line comment with multi-line tags */
+
+"some text"
+"some text with url: http://sample.com"
bgstack15