summaryrefslogtreecommitdiff
path: root/src/codeeditor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/codeeditor.cc')
-rw-r--r--src/codeeditor.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/codeeditor.cc b/src/codeeditor.cc
index d639953..6d2dd2e 100644
--- a/src/codeeditor.cc
+++ b/src/codeeditor.cc
@@ -129,6 +129,16 @@ void CodeEditor::highlightCurrentLine()
void CodeEditor::runningLine(int lineno)
{
lineNumber = lineno;
+ errorLineNumber = 0; // no error
+ repaint();
+}
+
+void CodeEditor::errorLine(QString file, int lineno, QString msg)
+{
+ (void)file;
+ (void)msg;
+ lineNumber = 0;
+ errorLineNumber = lineno;
repaint();
}
@@ -152,6 +162,10 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
{
painter.setPen(Qt::green);
}
+ else if(blockNumber + 1 == errorLineNumber)
+ {
+ painter.setPen(Qt::red);
+ }
else
{
painter.setPen(Qt::black);