diff --git a/nav.go b/nav.go index b620c5e..9289fd2 100644 --- a/nav.go +++ b/nav.go @@ -462,17 +462,12 @@ func (nav *nav) position() { func (nav *nav) previewLoop(ui *ui) { var prev string for path := range nav.previewChan { - var clear bool - if len(path) == 0 { - clear = true - } + clear := len(path) == 0 loop: for { select { case path = <-nav.previewChan: - if len(path) == 0 { - clear = true - } + clear = clear || len(path) == 0 default: break loop }