summaryrefslogtreecommitdiff
path: root/src/highlighter.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-01-12 23:01:24 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-01-12 23:01:24 (GMT)
commitf4f06d48d852437ee0d70b7541c9b8a1893d9624 (patch)
tree4050fec6feae0e34362212f526d5d824c62f3f7f /src/highlighter.cc
parent3ff8ca36b5bbb57b4039d8f6372d52d2b6ab0eaf (diff)
fix for gcc. simplify mainwin.cc a bit.
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