aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp
index 9997961b..60f5af57 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.cpp
@@ -67,7 +67,7 @@ void Custom_Syntax::loadRules(QString type){
}
//Alternate Keywords (built-in functions)
keywords.clear();
- keywords << "for" << "while" << "switch" << "case" << "if";
+ keywords << "for" << "while" << "switch" << "case" << "if" << "else" << "return" << "exit";
rule.format.setForeground( QColor(settings->value("colors/altkeyword").toString()) );
for(int i=0; i<keywords.length(); i++){
rule.pattern = QRegExp("\\b"+keywords[i]+"\\b"); //turn each keyword into a QRegExp and insert the rule
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
index ad8a592b..8f5e5a77 100644
--- a/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
+++ b/src-qt5/desktop-utils/lumina-textedit/syntaxSupport.h
@@ -97,7 +97,7 @@ protected:
for(int i=0; i<rules.length(); i++){
QRegExp patt(rules[i].pattern); //need a copy of the rule's pattern (will be changing it below)
int index = patt.indexIn(text);
- if(splitactive>=0 && index>=start){ continue; } //skip this one - falls within a multi-line pattern above
+ 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);
bgstack15