diff --git a/src/calibre/gui2/tweak_book/editor/snippets.py b/src/calibre/gui2/tweak_book/editor/snippets.py index d689d549d3..7e69a663c9 100644 --- a/src/calibre/gui2/tweak_book/editor/snippets.py +++ b/src/calibre/gui2/tweak_book/editor/snippets.py @@ -201,7 +201,7 @@ class Template(list): if not self.has_tab_stops: return False pos = cursor.position() - if self.left_most_cursor.position() <= pos <= self.right_most_cursor.position(): + if self.left_most_position <= pos <= self.right_most_position: return True return False @@ -272,7 +272,7 @@ class SnippetManager(QObject): for template in self.active_templates: if at is None and template.contains_cursor(cursor): at = template - elif pos > template.right_most_cursor.position() or pos < template.left_most_cursor.position(): + elif pos > template.right_most_position or pos < template.left_most_position: remove.append(template) for template in remove: self.active_templates.remove(template)