Skip to content

Commit

Permalink
fix tail not being set up correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bloa committed Jul 1, 2020
1 parent f9d4205 commit 48eac83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyggi/tree/xml_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,12 @@ def do_insert(cls, program, op, new_contents, modification_points):
for i, child in enumerate(parent):
if child == target:
tmp = copy.deepcopy(ingredient)
tmp.tail = None
if op.direction == 'after':
tmp.tail = child.tail
child.tail = None
i += 1
else:
tmp.tail = None
parent.insert(i, tmp)
break
else:
Expand Down

0 comments on commit 48eac83

Please sign in to comment.