1
1
mirror of https://github.com/walles/moar.git synced 2024-08-16 15:30:34 +03:00

Tune logging

This commit is contained in:
Johan Walles 2024-05-18 15:23:37 +02:00
parent d1fac66a23
commit 11095496b2

View File

@ -23,7 +23,7 @@ func (p *Pager) scrollToSearchHits() {
}
firstHitPosition := p.findFirstHit(*lineNumber, nil, false)
if firstHitPosition == nil {
if firstHitPosition == nil && (*lineNumber != linenumbers.LineNumber{}) {
// Try again from the top
firstHitPosition = p.findFirstHit(linenumbers.LineNumber{}, lineNumber, false)
}