mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix #1985973 [Context menu fails in the Editor](https://bugs.launchpad.net/calibre/+bug/1985973)
This commit is contained in:
parent
e77de1e770
commit
b1e20978c1
@ -543,7 +543,7 @@ class Editor(QMainWindow):
|
||||
c.setPosition(orig_pos - utf16_length(word))
|
||||
found = False
|
||||
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
|
||||
fc = self.editor.textCursor()
|
||||
if fc.position() < c.position():
|
||||
|
Loading…
x
Reference in New Issue
Block a user