Skip to content

Commit

Permalink
Fix syntax highlighter init (#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo authored May 14, 2024
2 parents e4acfb4 + 0afa15f commit 6a441b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions novelwriter/gui/doceditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ def updateSyntaxColours(self) -> None:
self.docHeader.matchColours()
self.docFooter.matchColours()

self._qDocument.syntaxHighlighter.initHighlighter()

return

def initEditor(self) -> None:
Expand Down Expand Up @@ -336,6 +334,9 @@ def initEditor(self) -> None:
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.
Expand Down

0 comments on commit 6a441b1

Please sign in to comment.