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