|
@@ -263,12 +263,13 @@ class Diff(object):
|
263
|
263
|
# Setup line width and number width
|
264
|
264
|
if width <= 0:
|
265
|
265
|
width = 80
|
266
|
|
-
|
267
|
266
|
(start, offset) = self._hunks[-1]._old_addr
|
268
|
267
|
max1 = start + offset - 1
|
269
|
268
|
(start, offset) = self._hunks[-1]._new_addr
|
270
|
269
|
max2 = start + offset - 1
|
271
|
270
|
num_width = max(len(str(max1)), len(str(max2)))
|
|
271
|
+
|
|
272
|
+ # Setup lineno and line format
|
272
|
273
|
left_num_fmt = colorize('%%(left_num)%ds' % num_width, 'yellow')
|
273
|
274
|
right_num_fmt = colorize('%%(right_num)%ds' % num_width, 'yellow')
|
274
|
275
|
line_fmt = left_num_fmt + ' %(left)s ' + COLORS['reset'] + \
|