Skip to content

Commit

Permalink
Don't compute previews if they aren't visible in the window #14
Browse files Browse the repository at this point in the history
  • Loading branch information
dsummersl authored and simnalamburt committed Jun 20, 2022
1 parent 4cc954f commit c0d814b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/mundo/graphlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ def walk_nodes(nodes):
char = 'w'
else:
char = 'o'
show_inine_diff = inline_graph and line_number >= first_visible_line and line_number <= last_visible_line
preview_diff = nodesData.preview_diff(node.parent, node, False, show_inine_diff)
compute_preview = line_number >= first_visible_line and line_number <= last_visible_line
preview_diff = '...'
if compute_preview:
preview_diff = nodesData.preview_diff(node.parent, node, False, inline_graph)
line = '[%s] %-10s %s' % (node.n, age_label, preview_diff)
new_lines = ascii(state, 'C', char, [line], asciiedges(seen, node, parents), verbose)
line_number += len(new_lines)
Expand Down

0 comments on commit c0d814b

Please sign in to comment.