diff --git a/pythonx/UltiSnips/text_objects/_base.py b/pythonx/UltiSnips/text_objects/_base.py index feb014c..0809bb9 100644 --- a/pythonx/UltiSnips/text_objects/_base.py +++ b/pythonx/UltiSnips/text_objects/_base.py @@ -350,10 +350,11 @@ class EditableTextObject(TextObject): child._parent = None self._children.remove(child) - # If this is a tabstop, delete it + # If this is a tabstop, delete it. Might have been deleted already if + # it was nested. try: del self._tabstops[child.number] - except AttributeError: + except (AttributeError, KeyError): pass class NoneditableTextObject(TextObject):