##// END OF EJS Templates
patch: move yielding "\n" to the end of loop...
Jun Wu -
r37748:8d730f96 default
parent child Browse files
Show More
@@ -2505,9 +2505,8 b' def difflabel(func, *args, **kw):'
2505 matches = {}
2505 matches = {}
2506 if inlinecolor:
2506 if inlinecolor:
2507 matches = _findmatches(lines)
2507 matches = _findmatches(lines)
2508 linecount = len(lines)
2508 for i, line in enumerate(lines):
2509 for i, line in enumerate(lines):
2509 if i != 0:
2510 yield ('\n', '')
2511 if head:
2510 if head:
2512 if line.startswith('@'):
2511 if line.startswith('@'):
2513 head = False
2512 head = False
@@ -2546,6 +2545,8 b' def difflabel(func, *args, **kw):'
2546 yield (line, '')
2545 yield (line, '')
2547 if line != stripline:
2546 if line != stripline:
2548 yield (line[len(stripline):], 'diff.trailingwhitespace')
2547 yield (line[len(stripline):], 'diff.trailingwhitespace')
2548 if i + 1 < linecount:
2549 yield ('\n', '')
2549
2550
2550 def _findmatches(slist):
2551 def _findmatches(slist):
2551 '''Look for insertion matches to deletion and returns a dict of
2552 '''Look for insertion matches to deletion and returns a dict of
General Comments 0
You need to be logged in to leave comments. Login now