Fix Screen::scrollUp() behavior
Review Request #130133 - Created May 16, 2017 and submitted
Patch from Nicholas Marriott (of tmux fame).
Currently Screen::scrollUp() is broken and cannot be used by tmux.
("set -as terminal-overrides ',*:indn@'" in .tmux.conf is a workaround)
Fix the issue by copying the checks in Screen::scrollDown().
Tested with tmux trunk.
I've added a new diff revision. The previous revision had an issue that the first character
on the last line was sometimes incorrectly cleared.