fix: check directory for changes during select (#2377)

* fix: check directory for changes during `select`

* Update `CHANGELOG.md`
This commit is contained in:
Joe Lim authored and GitHub committed 2026-02-08 19:06:44 +11:00
1 parent a32371088b
commit 89a6697d47
2 files changed
+4 -3

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- Previews are now cleaned when changing to an empty directory (#2369).
- Previews are now correctly updated on `visual-change` (#2373).
- The `dircounts` indicator for errors is changed back to `!` instead of `?` (#2372).
- The `select` command can now select files immediately after creation as part of a script (#2377).
## [r41](https://github.com/gokcehan/lf/releases/tag/r41)
+3 -3
View File
@@ -1544,12 +1544,12 @@ func (e *callExpr) eval(app *app, _ []string) {
}
dir := app.nav.currDir()
app.nav.checkDir(dir)
if dir.loading {
dir.files = append(dir.files, &file{FileInfo: lstat})
} else {
app.nav.currDir().sel(filepath.Base(path), app.nav.height)
app.ui.loadFile(app, true)
}
dir.sel(filepath.Base(path), app.nav.height)
app.ui.loadFile(app, true)
case "source":
if len(e.args) != 1 {
app.ui.echoerr("source: requires an argument")