Fix diff parser: The prefix was wrong in some copy cases

This commit is contained in:
Dave Halter
2019-01-05 18:33:38 +01:00
parent deaf1f310b
commit a8ec75fedd
2 changed files with 21 additions and 28 deletions

View File

@@ -659,6 +659,10 @@ class _NodesTree(object):
tos.add_tree_nodes(prefix, new_nodes, line_offset, last_line_offset_leaf)
self.prefix = new_prefix
self._prefix_remainder = ''
else:
# Need to reset the prefix, because it might have been reset higher
# up in the stack.
self.prefix = prefix
return new_nodes, working_stack