This commit is contained in:
Kovid Goyal 2016-05-24 11:48:52 +05:30
parent a33960c91c
commit ce6dd88255

View File

@ -391,6 +391,7 @@ class TextEdit(PlainTextEdit):
c.setPosition(c.anchor() + idx) c.setPosition(c.anchor() + idx)
c.setPosition(c.position() + string_length(word), c.KeepAnchor) c.setPosition(c.position() + string_length(word), c.KeepAnchor)
if self.smarts.verify_for_spellcheck(c, self.highlighter): if self.smarts.verify_for_spellcheck(c, self.highlighter):
self.highlighter.join() # Ensure highlighting is finished
locale = self.spellcheck_locale_for_cursor(c) locale = self.spellcheck_locale_for_cursor(c)
if not lang or not locale or (locale and lang == locale.langcode): if not lang or not locale or (locale and lang == locale.langcode):
self.setTextCursor(c) self.setTextCursor(c)