perf: optimize lookup (#2512)

This commit is contained in:
valoq authored and GitHub committed 2026-04-13 23:24:54 +10:00
1 parent f83a0d0eed
commit 6d50d981ab
1 file changed
+1 -5
+1 -5
View File
@@ -444,11 +444,7 @@ func (app *app) loop() {
app.ui.draw(app.nav)
case f := <-app.nav.fileChan:
for _, dir := range app.nav.dirCache {
if dir.path != filepath.Dir(f.path) {
continue
}
if dir, ok := app.nav.dirCache[filepath.Dir(f.path)]; ok {
for i := range dir.allFiles {
if dir.allFiles[i].path == f.path {
dir.allFiles[i] = f