equal
deleted
inserted
replaced
666 num = int(char[:-1]) |
666 num = int(char[:-1]) |
667 # either skip first num lines or take last num lines, based on sign |
667 # either skip first num lines or take last num lines, based on sign |
668 return -num <= i if num < 0 else (len(lines) - i) <= num |
668 return -num <= i if num < 0 else (len(lines) - i) <= num |
669 for i, line in enumerate(lines): |
669 for i, line in enumerate(lines): |
670 line[:] = [c[-1] if _drawgp(c, i) else parent for c in line] |
670 line[:] = [c[-1] if _drawgp(c, i) else parent for c in line] |
671 edgemap = dict( |
671 edgemap.update( |
672 (e, c if len(c) < 2 else parent) for e, c in edgemap.items()) |
672 (e, (c if len(c) < 2 else parent)) for e, c in edgemap.items()) |
673 |
673 |
674 # print lines |
674 # print lines |
675 indentation_level = max(ncols, ncols + coldiff) |
675 indentation_level = max(ncols, ncols + coldiff) |
676 for (line, logstr) in zip(lines, text): |
676 for (line, logstr) in zip(lines, text): |
677 ln = "%-*s %s" % (2 * indentation_level, "".join(line), logstr) |
677 ln = "%-*s %s" % (2 * indentation_level, "".join(line), logstr) |