summaryrefslogtreecommitdiff
path: root/ui/buffers.go
diff options
context:
space:
mode:
authorNomeji <nomeji@saucisseroyale.cc>2022-10-13 17:52:36 +0200
committerdelthas <delthas@dille.cc>2022-10-13 17:53:30 +0200
commit0bef7424e21f24310f74a90f1f61874ea3bfeec6 (patch)
treecbed189b6a4d7e1fbdb91e1b62966e2730de5158 /ui/buffers.go
parentFix crashing on ISUPPORT PREFIX= (diff)
Scroll to buffer on zoom
Diffstat (limited to 'ui/buffers.go')
-rw-r--r--ui/buffers.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/buffers.go b/ui/buffers.go
index 75948af..0e398de 100644
--- a/ui/buffers.go
+++ b/ui/buffers.go
@@ -632,6 +632,10 @@ func (bs *BufferList) HorizontalBufferOffset(x int, offset int) int {
}
func (bs *BufferList) GetLeftMost(screenWidth int) int {
+ if len(bs.list) == 0 {
+ return 0
+ }
+
width := 0
var leftMost int