Real Mono does this asymmetrically, it turns out: [SPACE] scrolls down
in such a way that the new screenful has 2 lines in common with the
old one, whereas [-] scrolls up by a little less so that you have 4
lines in common.
I can't quite bring myself to replicate _that_ oddity, so I've
compromised on 3 in both directions.
def move_by(self, delta):
return self.move_to(self.linepos + delta)
- def down_screen(self): return self.move_by(self.cc.scr_h - 1)
- def up_screen(self): return self.move_by(-(self.cc.scr_h - 1))
+ def down_screen(self): return self.move_by(max(1, self.cc.scr_h - 3))
+ def up_screen(self): return self.move_by(-max(1, self.cc.scr_h - 3))
def down_line(self): return self.move_by(+1)
def up_line(self): return self.move_by(-1)
def goto_top(self): return self.move_to(0)