Skip to content

Commit

Permalink
Fixed the index for parenthesis matching.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed May 24, 2016
1 parent bc76119 commit a65845a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMEdit/OMEditGUI/Editors/ModelicaEditor.cpp
Expand Up @@ -798,10 +798,10 @@ void ModelicaTextHighlighter::highlightMultiLine(const QString &text)
&& text[index+4] == 't' && text[index+5] == 'a' && text[index+6] == 't' && text[index+7] == 'i' && text[index+8] == 'o'
&& text[index+9] == 'n') {
if (index+9 == text.length() - 1) { // if we just have annotation keyword in the line
index = index + 9;
index = index + 8;
foldingState = true;
} else if (index+10<text.length() && (text[index+10] == '(' || text[index+10] == ' ')) { // if annotation keyword is followed by '(' or space.
index = index + 10;
index = index + 9;
foldingState = true;
}
}
Expand Down

0 comments on commit a65845a

Please sign in to comment.