This commit is contained in:
Kovid Goyal 2015-01-08 07:59:20 +05:30
parent b0e98e0442
commit a84e622e5f

View File

@ -201,7 +201,7 @@ class Template(list):
if not self.has_tab_stops: if not self.has_tab_stops:
return False return False
pos = cursor.position() 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 True
return False return False
@ -272,7 +272,7 @@ class SnippetManager(QObject):
for template in self.active_templates: for template in self.active_templates:
if at is None and template.contains_cursor(cursor): if at is None and template.contains_cursor(cursor):
at = template 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) remove.append(template)
for template in remove: for template in remove:
self.active_templates.remove(template) self.active_templates.remove(template)