I was accidentally clearing the whole screen when I needed to clear from cursor to the end of the screen