diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index af976059..70912ddb 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -22,7 +22,7 @@ jobs: # commandline below: # https://github.com/golangci/golangci-lint/releases/latest - name: Install golangci-lint - run: curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.3 + run: curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.13.1 # Required by test.sh - name: Install mandoc diff --git a/internal/detectManPage.go b/internal/detectManPage.go index c8c19974..c835b33a 100644 --- a/internal/detectManPage.go +++ b/internal/detectManPage.go @@ -12,10 +12,6 @@ const manPageDetectionLines = 14 func (p *Pager) haveLoadedManPage() bool { reader := p.Reader() - if reader == nil { - return false - } - for _, line := range reader.GetLines(linemetadata.Index{}, manPageDetectionLines).Lines { if line.Line.HasManPageFormatting() { return true diff --git a/internal/pager.go b/internal/pager.go index 2d521de9..2ca959b2 100644 --- a/internal/pager.go +++ b/internal/pager.go @@ -420,6 +420,7 @@ func (p *Pager) moveRight(delta int) { } } +// Reader returns the currently active reader, never nil. func (p *Pager) Reader() reader.Reader { if p.isShowingHelp { return _HelpReader