461 ) |
460 ) |
462 |
461 |
463 # shift_interline is the line containing the non-vertical |
462 # shift_interline is the line containing the non-vertical |
464 # edges between this entry and the next |
463 # edges between this entry and the next |
465 shift_interline = echars[: idx * 2] |
464 shift_interline = echars[: idx * 2] |
466 for i in pycompat.xrange(2 + coldiff): |
465 for i in range(2 + coldiff): |
467 shift_interline.append(b' ') |
466 shift_interline.append(b' ') |
468 count = ncols - idx - 1 |
467 count = ncols - idx - 1 |
469 if coldiff == -1: |
468 if coldiff == -1: |
470 for i in pycompat.xrange(count): |
469 for i in range(count): |
471 shift_interline.extend([b'/', b' ']) |
470 shift_interline.extend([b'/', b' ']) |
472 elif coldiff == 0: |
471 elif coldiff == 0: |
473 shift_interline.extend(echars[(idx + 1) * 2 : ncols * 2]) |
472 shift_interline.extend(echars[(idx + 1) * 2 : ncols * 2]) |
474 else: |
473 else: |
475 for i in pycompat.xrange(count): |
474 for i in range(count): |
476 shift_interline.extend([b'\\', b' ']) |
475 shift_interline.extend([b'\\', b' ']) |
477 |
476 |
478 # draw edges from the current node to its parents |
477 # draw edges from the current node to its parents |
479 _drawedges(echars, edges, nodeline, shift_interline) |
478 _drawedges(echars, edges, nodeline, shift_interline) |
480 |
479 |