Commits

immerrr committed ccdd582

crpatch.parsepatch: when splitting diff hunk into smaller ones, account after-context when calculating their start lines

Comments (0)

Files changed (1)

                      self.before, self.changedlines, self.context)
             self.header.hunks.append(h)
             self.stream.append(h)
-            self.fromline += len(self.before) + h.removed
-            self.toline += len(self.before) + h.added
+            self.fromline += len(self.before) + h.removed + len(self.context)
+            self.toline += len(self.before) + h.added + len(self.context)
             self.before = []
             self.changedlines = []
             self.context = []