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:
1 parent
ede1e7e7c3
commit
3ec5ee8616
2 files changed
+10
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user