From 81018c2da73aa68c4158a21068cd0b06d5f4789a Mon Sep 17 00:00:00 2001 From: FIGBERT Date: Tue, 18 Apr 2023 23:07:09 -0700 Subject: [PATCH] Keep selected room on screen when scrolling --- ui/view-roster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/view-roster.go b/ui/view-roster.go index d2a1f7f..a70a379 100644 --- a/ui/view-roster.go +++ b/ui/view-roster.go @@ -148,7 +148,7 @@ func (rstr *RosterView) ScrollNext() { rstr.Lock() defer rstr.Unlock() rstr.selected = rstr.rooms[index+1] - if rstr.VisualScrollHeight(rstr.scrollOffset, index+1) >= rstr.height { + if rstr.VisualScrollHeight(rstr.scrollOffset, index+2) >= rstr.height { rstr.scrollOffset++ } }