Fix paint on terminal resizing