Increase performance and reduce blinking

remember the last written line to prevent writing the same line again. 
This decreased the run time of my database migration script by ~20 seconds (55s vs 34s). 
Lots of data, fast databases, slow terminal. 
This change shouldn't have much visual effect (besides some reduced blinking) and should increase the performance in cases where a lot of ticks appear.