Fix exception on :del
authorJack Miller <jack@codezen.org>
Fri, 19 Jun 2015 16:47:38 +0000 (11:47 -0500)
committerJack Miller <jack@codezen.org>
Fri, 19 Jun 2015 16:47:38 +0000 (11:47 -0500)
canto_curses/taglist.py

index 5b31f4b..f2b7234 100644 (file)
@@ -1086,8 +1086,8 @@ class TagList(GuiBase):
         # we'd overwrite on writing the floating header, so adjust
         # the target_offset.
 
-        if target_obj not in self.tags:
-            tag = self.tag_by_item(target_obj)
+        if not target_obj.is_tag:
+            tag = target_obj.parent_tag
             tl = tag.lines(self.width)
             if target_offset < tl:
                 target_offset = tl