SyntiaxHighlighter: Move VCS highlighters creating to TextDocument

Change-Id: I531b30d31fb630d2292eaf4d8c61ff1e95fed460
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-05-17 10:28:06 +02:00
parent 4bfc3476f4
commit 52f4c66b7e
18 changed files with 31 additions and 35 deletions

View File

@@ -1104,8 +1104,8 @@ void VcsBaseEditorWidget::slotActivateAnnotation()
ah->setChangeNumbers(changes);
ah->rehighlight();
} else {
BaseAnnotationHighlighter *highlighter = createAnnotationHighlighter(changes);
textDocument()->setSyntaxHighlighterCreator([highlighter] { return highlighter; });
BaseAnnotationHighlighterCreator creator = annotationHighlighterCreator();
textDocument()->setSyntaxHighlighterCreator([creator, changes] { return creator(changes); });
}
}