summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 8834b75..6bb43e6 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -1037,14 +1037,12 @@ bool MainWindow::compileTopLevelDocument(bool reload)
false);
if (!animate_panel->isVisible()) {
+ highlighter->unhighlightLastError();
if (!this->root_module) {
- highlighter->unhighlightLastError();
QTextCursor cursor = editor->textCursor();
- cursor.setPosition( parser_error_pos );
- editor->setTextCursor( cursor );
+ cursor.setPosition(parser_error_pos);
+ editor->setTextCursor(cursor);
highlighter->highlightError( parser_error_pos );
- } else {
- highlighter->unhighlightLastError();
}
}
contact: Jan Huwald // Impressum