it would be nice if a plugin author could say ‘sublime, please dont redraw the buffer, im doing a lot of small changes, ill tell you when im done’. effectivly something like requestAnimationFrame
in HTML/JS world.
i think a view.pauseRedraw()
and view.resumeRedraw()
would be better than one function accepting a callback, as we dont need more asynch dataflow and
try:
view.pauseRedraw();
#something causing a lot of redraws, eg appending some text after every letter or whatever
except:
pass
finally:
view.resumeRedraw()
is quite neat