Automatically unselect files after watch remove (#1901)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-02-03 10:45:53 +11:00
1 parent 7595e05957
commit 4f0a5d6211
1 file changed
+5
+5
View File
@@ -467,6 +467,11 @@ func (app *app) loop() {
case path := <-app.nav.delChan:
delete(app.nav.dirCache, path)
delete(app.nav.regCache, path)
delete(app.nav.selections, path)
if len(app.nav.selections) == 0 {
app.nav.selectionInd = 0
}
case ev := <-app.ui.evChan:
e := app.ui.readEvent(ev, app.nav)
if e == nil {