Anti-flicker now works in a more reliable way

More specifically, it now only redraws the part that changed until you
release the mouse button. It also checks array bounds before attempting
to access the array.