*** difflib.py --- difflib.py *************** *** 573,584 **** codes = self.get_opcodes() # Fixup leading and trailing groups if they show no changes. ! if codes[0][0] == 'equal': ! tag, i1, i2, j1, j2 = codes[0] ! codes[0] = tag, max(i1, i2-n), i2, max(j1, j2-n), j2 ! if codes[-1][0] == 'equal': ! tag, i1, i2, j1, j2 = codes[-1] ! codes[-1] = tag, i1, min(i2, i1+n), j1, min(j2, j1+n) nn = n + n group = [] --- 573,585 ---- codes = self.get_opcodes() # Fixup leading and trailing groups if they show no changes. ! if codes: ! if codes[0][0] == 'equal': ! tag, i1, i2, j1, j2 = codes[0] ! codes[0] = tag, max(i1, i2-n), i2, max(j1, j2-n), j2 ! if codes[-1][0] == 'equal': ! tag, i1, i2, j1, j2 = codes[-1] ! codes[-1] = tag, i1, min(i2, i1+n), j1, min(j2, j1+n) nn = n + n group = [] ###