Fix diff parser get_last_line calculation

This commit is contained in:
Dave Halter
2018-12-31 01:25:11 +01:00
parent 0126a38bd1
commit 750b8af37b
2 changed files with 29 additions and 0 deletions

View File

@@ -447,6 +447,9 @@ class _NodesTreeNode(object):
if suffix and not suffix.endswith('\n'):
# This is the end of a file (that doesn't end with a newline).
line += 1
if self._node_children:
return max(line, self._node_children[-1].get_last_line(suffix))
return line