From b60d54fbc95ad04a93ecf32d66685fa26614355a Mon Sep 17 00:00:00 2001 From: Tomohiro Nishimura Date: Sun, 17 May 2015 22:57:40 +0900 Subject: [PATCH] Fix horizontal scroll bug around line cache --- layout.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layout.go b/layout.go index 9c62e2e..9a39aa0 100644 --- a/layout.go +++ b/layout.go @@ -693,9 +693,8 @@ func (l *BasicLayout) HorizontalScroll(p PagingRequest) { } else if l.currentCol < 0 { l.currentCol += width / 2 } - buf := l.GetCurrentLineBuffer() - for n := 0; n < len(l.list.displayCache); n++ { - if line, err := buf.LineAt(n); err == nil { + for _, line := range l.list.displayCache { + if line != nil { line.SetDirty(true) } }