lib/vedeu/output/renderers/all.rb in vedeu-0.6.28 vs lib/vedeu/output/renderers/all.rb in vedeu-0.6.29

- old
+ new

@@ -18,11 +18,11 @@ # @return [Array<void>] def clear threads = storage.map do |renderer| Thread.new(renderer) do mutex.synchronize do - renderer.clear + toggle_cursor { renderer.clear } end end end threads.each(&:join) @@ -49,11 +49,11 @@ # @return [Array<void>] def render(output) threads = storage.map do |renderer| Thread.new(renderer) do mutex.synchronize do - renderer.render(output) + toggle_cursor { renderer.render(output) } end end end threads.each(&:join) @@ -97,9 +97,18 @@ end # @return [Set] def storage @storage ||= in_memory + end + + # @return [void] + def toggle_cursor + Vedeu.hide_cursor(Vedeu.focus) + + yield + + Vedeu.show_cursor(Vedeu.focus) end end # Renderers # @example