We cleared assume_complete_redraw directly in the run handler
before.
This leads to a relative long time between clearing and drawing again
("git log" hasn't even started!).
It was done unconditionally when assume_complete_redraw was set,
even when the repo was small enough to compute the next graph under
100ms. But when the graph drawing is fast, clearing early basically
just introduces a flicker which we should avoid as it is a visual
regression.
Do this differently then. We still always clear the graph when
assume_complete_redraw is set. But we do this immediately before
drawing (t.i. in draw) or when the first token is not available
within 100ms.
That means for fast repos, we clear and draw in the same tick, and
Sublime Text will not produce any flicker.
We cleared
assume_complete_redraw
directly in therun
handler before.assume_complete_redraw
was set, even when the repo was small enough to compute the next graph under 100ms. But when the graph drawing is fast, clearing early basically just introduces a flicker which we should avoid as it is a visual regression.Do this differently then. We still always clear the graph when
assume_complete_redraw
is set. But we do this immediately before drawing (t.i. indraw
) or when the first token is not available within 100ms.That means for fast repos, we clear and draw in the same tick, and Sublime Text will not produce any flicker.