Fix syntax highlighter init (#1866)
This commit is contained in:
@@ -301,8 +301,6 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
self.docHeader.matchColours()
|
||||
self.docFooter.matchColours()
|
||||
|
||||
self._qDocument.syntaxHighlighter.initHighlighter()
|
||||
|
||||
return
|
||||
|
||||
def initEditor(self) -> None:
|
||||
@@ -336,6 +334,9 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
font.setPointSize(CONFIG.textSize)
|
||||
self._qDocument.setDefaultFont(font)
|
||||
|
||||
# Update highlighter settings
|
||||
self._qDocument.syntaxHighlighter.initHighlighter()
|
||||
|
||||
# Set default text margins
|
||||
# Due to cursor visibility, a part of the margin must be
|
||||
# allocated to the document itself. See issue #1112.
|
||||
|
||||
Reference in New Issue
Block a user