1
1
mirror of https://github.com/walles/moar.git synced 2024-09-11 12:15:43 +03:00

Handle scrolling down while stream is loading

I don't know how this could work even without the stream loading, but
now it does.

Fixes #235.
This commit is contained in:
Johan Walles 2024-08-09 09:50:38 +02:00
parent db41b5c946
commit 3b5b2ff31f

View File

@ -266,10 +266,11 @@ func (p *Pager) handleScrolledUp() {
func (p *Pager) handleScrolledDown() {
if p.isScrolledToEnd() {
// Follow output
reallyHigh := linenumbers.LineNumberMax()
p.TargetLineNumber = &reallyHigh
} else {
p.TargetLineNumber = &linenumbers.LineNumber{}
p.TargetLineNumber = nil
}
}