Commit dd54cc6a authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Don't remove syntax errors on each document change

Especially when several error markers exist, the flashing this causes
while editing isn't really nice.

Reviewed-by: Roberto Raggi
parent f3c2bbaa
...@@ -717,8 +717,6 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc) ...@@ -717,8 +717,6 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc)
continue; continue;
else if (lines.contains(m.line())) else if (lines.contains(m.line()))
continue; continue;
//else if (lines.size() == MAX_SELECTION_COUNT)
//break; // we're done.
lines.insert(m.line()); lines.insert(m.line());
......
...@@ -168,10 +168,6 @@ private: ...@@ -168,10 +168,6 @@ private:
mutable QMutex mutex; mutable QMutex mutex;
enum {
MAX_SELECTION_COUNT = 5
};
struct Editor { struct Editor {
QPointer<TextEditor::BaseTextEditor> widget; QPointer<TextEditor::BaseTextEditor> widget;
QList<QTextEdit::ExtraSelection> selections; QList<QTextEdit::ExtraSelection> selections;
......
...@@ -91,10 +91,6 @@ void CppEditorSupport::updateDocument() ...@@ -91,10 +91,6 @@ void CppEditorSupport::updateDocument()
const QList<QTextEdit::ExtraSelection> selections = const QList<QTextEdit::ExtraSelection> selections =
edit->extraSelections(TextEditor::BaseTextEditor::CodeWarningsSelection); edit->extraSelections(TextEditor::BaseTextEditor::CodeWarningsSelection);
if (! selections.isEmpty())
edit->setExtraSelections(TextEditor::BaseTextEditor::CodeWarningsSelection,
QList<QTextEdit::ExtraSelection>());
_modelManager->stopEditorSelectionsUpdate(); _modelManager->stopEditorSelectionsUpdate();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment