commit d852436
delthas
·
2024-07-03 12:28:57 +0000 UTC
parent c527c58
Fix rare panic on scrolling horizontal channels on small terminals Fixes: https://todo.sr.ht/~delthas/senpai/161
1 files changed,
+3,
-0
M
ui/ui.go
M
ui/ui.go
+3,
-0
1@@ -275,6 +275,9 @@ func (ui *UI) ScrollChannelUpBy(n int) {
2
3 func (ui *UI) ScrollChannelDownBy(n int) {
4 ui.channelOffset += n
5+ if ui.channelOffset > len(ui.bs.list) {
6+ ui.channelOffset = len(ui.bs.list)
7+ }
8 }
9
10 func (ui *UI) HorizontalBufferOffset(x int) int {