commit 0bef742
Nomeji
·
2022-10-13 15:52:36 +0000 UTC
parent cdeb759
Scroll to buffer on zoom
2 files changed,
+5,
-0
+4,
-0
1@@ -632,6 +632,10 @@ func (bs *BufferList) HorizontalBufferOffset(x int, offset int) int {
2 }
3
4 func (bs *BufferList) GetLeftMost(screenWidth int) int {
5+ if len(bs.list) == 0 {
6+ return 0
7+ }
8+
9 width := 0
10 var leftMost int
11
M
ui/ui.go
+1,
-0
1@@ -424,6 +424,7 @@ func (ui *UI) Resize() {
2 } else {
3 ui.bs.ResizeTimeline(innerWidth, h-2, textWidth)
4 }
5+ ui.HorizontalBufferScrollTo()
6 ui.screen.Sync()
7 }
8