From 8388b4f3858c80eda3c5a867d7ff865fce0904a7 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sat, 18 May 2019 18:20:08 +0300 Subject: [PATCH] Revert "do not cd when select on directory" This reverts commit f071a3ae705a3577ef3d6688993952683ee68d7c. Related #167 --- nav.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nav.go b/nav.go index 2fec9dc..21a629d 100644 --- a/nav.go +++ b/nav.go @@ -773,6 +773,12 @@ func (nav *nav) sel(path string) error { return fmt.Errorf("select: %s", err) } + dir := filepath.Dir(path) + + if err := nav.cd(dir); err != nil { + return fmt.Errorf("select: %s", err) + } + base := filepath.Base(path) last := nav.dirs[len(nav.dirs)-1]