equal
deleted
inserted
replaced
347 |
347 |
348 # column markers are ASCII so we can calculate column |
348 # column markers are ASCII so we can calculate column |
349 # position in bytes |
349 # position in bytes |
350 columns = [ |
350 columns = [ |
351 x |
351 x |
352 for x in pycompat.xrange(len(div)) |
352 for x in range(len(div)) |
353 if div[x : x + 1] == b'=' and (x == 0 or div[x - 1 : x] == b' ') |
353 if div[x : x + 1] == b'=' and (x == 0 or div[x - 1 : x] == b' ') |
354 ] |
354 ] |
355 rows = [] |
355 rows = [] |
356 for l in block[b'lines'][1:-1]: |
356 for l in block[b'lines'][1:-1]: |
357 if l == div: |
357 if l == div: |
767 llen = len(lastparents) |
767 llen = len(lastparents) |
768 plen = len(parents) |
768 plen = len(parents) |
769 if llen and llen != plen: |
769 if llen and llen != plen: |
770 collapse = False |
770 collapse = False |
771 s = [] |
771 s = [] |
772 for j in pycompat.xrange(3, plen - 1): |
772 for j in range(3, plen - 1): |
773 parent = parents[j] |
773 parent = parents[j] |
774 if j >= llen or lastparents[j] != parent: |
774 if j >= llen or lastparents[j] != parent: |
775 s.append(len(blocks)) |
775 s.append(len(blocks)) |
776 sec = sections[parent][2] |
776 sec = sections[parent][2] |
777 blocks.append(sec[0]) |
777 blocks.append(sec[0]) |