File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,10 +128,15 @@ function start!(s::Spinner)
128128 return s
129129end
130130
131- function stop ! (s:: Spinner )
131+ function close_timer ! (s:: Spinner )
132132 if s. timer != = nothing
133133 close (s. timer)
134+ s. timer = nothing
134135 end
136+ end
137+
138+ function stop! (s:: Spinner )
139+ close_timer! (s)
135140 if ! s. enabled || s. silent
136141 return
137142 end
@@ -140,12 +145,16 @@ function stop!(s::Spinner)
140145end
141146
142147function success! (s)
148+ # Stop the timer before the final render so a pending tick can't
149+ # overwrite the ✔ line with a spinner frame.
150+ close_timer! (s)
143151 if s. enabled && ! s. silent
144152 render (s, " ✔" , :light_green )
145153 end
146154 stop! (s)
147155end
148156function fail! (s)
157+ close_timer! (s)
149158 if s. enabled && ! s. silent
150159 render (s, " ✖" , :light_red )
151160 end
You can’t perform that action at this time.
0 commit comments