diff options
| author | 2010-11-22 19:01:03 +0000 | |
|---|---|---|
| committer | 2010-11-22 19:01:03 +0000 | |
| commit | 5fd799e2b48e30fb560b219f684a8656af779672 (patch) | |
| tree | 16e9fb6cd28c0884f07d9a2000718c9e1a8ae378 /src/modules/editor/scripteditor.cpp | |
| parent | fixed restore script internal value; improved hungarian notation; added doxyg... (diff) | |
| download | KVIrc-5fd799e2b48e30fb560b219f684a8656af779672.tar.gz KVIrc-5fd799e2b48e30fb560b219f684a8656af779672.tar.bz2 KVIrc-5fd799e2b48e30fb560b219f684a8656af779672.zip | |
fixed some exceptions in syntax highlighter
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5167 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/editor/scripteditor.cpp')
| -rw-r--r-- | src/modules/editor/scripteditor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index 86ab06632..10e911bcf 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -633,9 +633,13 @@ void KviScriptEditorSyntaxHighlighter::updateSyntaxtTextFormat() void KviScriptEditorSyntaxHighlighter::highlightBlock(const QString & szText) { if(szText.isEmpty()) + { + setCurrentBlockState(previousBlockState()); return; + } int iIndexStart=0; + setCurrentBlockState(0); if(previousBlockState() == 1) { @@ -652,7 +656,6 @@ void KviScriptEditorSyntaxHighlighter::highlightBlock(const QString & szText) iCommentEnd+=2; // end of comment found setFormat(iIndexStart,iCommentEnd - iIndexStart,commentFormat); - setCurrentBlockState(0); iIndexStart = iCommentEnd; } @@ -693,7 +696,7 @@ void KviScriptEditorSyntaxHighlighter::highlightBlock(const QString & szText) setCurrentBlockState(1); while(iIndexStart<szText.size()) { - if((iIndexStart+2)<szText.size()) + if((iIndexStart+1)<szText.size()) { if(szText.at(iIndexStart).unicode() == '*' && szText.at(iIndexStart+1).unicode() == '/') |
