424 state['lastcoldiff'], fix_nodeline_tail)) |
425 state['lastcoldiff'], fix_nodeline_tail)) |
425 |
426 |
426 # shift_interline is the line containing the non-vertical |
427 # shift_interline is the line containing the non-vertical |
427 # edges between this entry and the next |
428 # edges between this entry and the next |
428 shift_interline = echars[:idx * 2] |
429 shift_interline = echars[:idx * 2] |
429 for i in xrange(2 + coldiff): |
430 for i in pycompat.xrange(2 + coldiff): |
430 shift_interline.append(' ') |
431 shift_interline.append(' ') |
431 count = ncols - idx - 1 |
432 count = ncols - idx - 1 |
432 if coldiff == -1: |
433 if coldiff == -1: |
433 for i in xrange(count): |
434 for i in pycompat.xrange(count): |
434 shift_interline.extend(['/', ' ']) |
435 shift_interline.extend(['/', ' ']) |
435 elif coldiff == 0: |
436 elif coldiff == 0: |
436 shift_interline.extend(echars[(idx + 1) * 2:ncols * 2]) |
437 shift_interline.extend(echars[(idx + 1) * 2:ncols * 2]) |
437 else: |
438 else: |
438 for i in xrange(count): |
439 for i in pycompat.xrange(count): |
439 shift_interline.extend(['\\', ' ']) |
440 shift_interline.extend(['\\', ' ']) |
440 |
441 |
441 # draw edges from the current node to its parents |
442 # draw edges from the current node to its parents |
442 _drawedges(echars, edges, nodeline, shift_interline) |
443 _drawedges(echars, edges, nodeline, shift_interline) |
443 |
444 |