This commit is contained in:
Kovid Goyal 2022-08-12 17:18:17 +05:30
parent e77de1e770
commit b1e20978c1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -543,7 +543,7 @@ class Editor(QMainWindow):
c.setPosition(orig_pos - utf16_length(word)) c.setPosition(orig_pos - utf16_length(word))
found = False found = False
self.editor.setTextCursor(c) self.editor.setTextCursor(c)
if self.editor.find_spell_word([word], locale.langcode, center_on_cursor=False): if locale and self.editor.find_spell_word([word], locale.langcode, center_on_cursor=False):
found = True found = True
fc = self.editor.textCursor() fc = self.editor.textCursor()
if fc.position() < c.position(): if fc.position() < c.position():