feat: change to parent directory if CWD is deleted (#2424)

* feat: change to parent directory if CWD is deleted

* fix lint warning

* Update `CHANGELOG.md`
This commit is contained in:
Joe Lim authored and GitHub committed 2026-03-10 15:24:37 +11:00
1 parent ede1e7e7c3
commit 3ec5ee8616
2 files changed
+10

No files matched your search

+9
View File
@@ -473,6 +473,15 @@ func (app *app) loop() {
deletePathRecursive(app.nav.regCache, path)
deletePathRecursive(app.nav.dirCache, path)
for _, dirPath := range app.nav.dirPaths {
if dirPath == path {
if err := app.nav.cd(filepath.Dir(path)); err != nil {
log.Print(err)
}
break
}
}
case ev := <-app.ui.evChan:
e := app.ui.readEvent(ev, app.nav)
if e == nil {