Fix potential undefined variable in editor

This commit is contained in:
Veronica Berglyd Olsen
2025-01-22 00:48:59 +01:00
parent eb113a8928
commit 53dfdb3a2e
+4 -4
View File
@@ -1104,10 +1104,10 @@ class GuiDocEditor(QPlainTextEdit):
else:
self._completer.setVisible(False)
if self._doReplace and added == 1:
cursor = self.textCursor()
if self._autoReplace.process(text, cursor):
self._qDocument.syntaxHighlighter.rehighlightBlock(cursor.block())
if self._doReplace and added == 1:
cursor = self.textCursor()
if self._autoReplace.process(text, cursor):
self._qDocument.syntaxHighlighter.rehighlightBlock(cursor.block())
return