diff kitten: Fix wrong number of scrolling lines after context switch
This commit is contained in:
parent
942881d1b7
commit
8e03da855f
1 changed files with 2 additions and 1 deletions
|
|
@ -293,10 +293,11 @@ def set_scrolling_region(self) -> None:
|
|||
|
||||
def scroll_lines(self, amt: int = 1) -> None:
|
||||
new_pos = max(0, min(self.scroll_pos + amt, self.max_scroll_pos))
|
||||
amt = new_pos - self.scroll_pos
|
||||
if new_pos == self.scroll_pos:
|
||||
self.cmd.bell()
|
||||
return
|
||||
if abs(new_pos - self.scroll_pos) >= self.num_lines - 1:
|
||||
if abs(amt) >= self.num_lines - 1:
|
||||
self.scroll_pos = new_pos
|
||||
self.draw_screen()
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue