Skip to content

Commit

Permalink
Handle scrolling down while stream is loading
Browse files Browse the repository at this point in the history
I don't know how this could work even without the stream loading, but
now it does.

Fixes #235.
  • Loading branch information
walles committed Aug 9, 2024
1 parent db41b5c commit 3b5b2ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion m/pager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 3b5b2ff

Please sign in to comment.