summaryrefslogtreecommitdiff
path: root/src/highlighter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/highlighter.cc')
-rw-r--r--src/highlighter.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/highlighter.cc b/src/highlighter.cc
index ab0a071..98eff8c 100644
--- a/src/highlighter.cc
+++ b/src/highlighter.cc
@@ -160,6 +160,8 @@ Highlighter::Highlighter(QTextDocument *parent)
commentFormat.setForeground(Qt::darkCyan);
errorFormat.setBackground(Qt::red);
+ errorState = false;
+ errorPos = -1;
lastErrorBlock = parent->begin();
}
@@ -209,7 +211,7 @@ void Highlighter::portable_rehighlightBlock( const QTextBlock &block )
void Highlighter::highlightBlock(const QString &text)
{
int block_first_pos = currentBlock().position();
- int block_last_pos = block_first_pos + currentBlock().length() - 1;
+ //int block_last_pos = block_first_pos + currentBlock().length() - 1;
//std::cout << "block[" << block_first_pos << ":" << block_last_pos << "]"
// << ", err:" << errorPos << "," << errorState
// << ", text:'" << text.toStdString() << "'\n";
contact: Jan Huwald // Impressum