Implemented this too. Now arrow keys or page up/down always move in increments modulo the line height with the top or bottom line always holding a full line, depending on which direction you are scrolling towards. That really helped make the scrolling look smooth. I also found that rendering above and below 1 full page of lines removed any flicker on page up and down: