Implement cursor visibility
Generalize ScrollUp and ScrollDown to take the lines count