fix: check directory for changes during select (#2377)
* fix: check directory for changes during `select` * Update `CHANGELOG.md`
This commit is contained in:
1 parent
a32371088b
commit
89a6697d47
2 files changed
+4
-3
No files matched your search
@@ -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 cleaned when changing to an empty directory (#2369).
|
||||||
- Previews are now correctly updated on `visual-change` (#2373).
|
- Previews are now correctly updated on `visual-change` (#2373).
|
||||||
- The `dircounts` indicator for errors is changed back to `!` instead of `?` (#2372).
|
- 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)
|
## [r41](https://github.com/gokcehan/lf/releases/tag/r41)
|
||||||
|
|
||||||
|
|||||||
@@ -1544,12 +1544,12 @@ func (e *callExpr) eval(app *app, _ []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dir := app.nav.currDir()
|
dir := app.nav.currDir()
|
||||||
|
app.nav.checkDir(dir)
|
||||||
if dir.loading {
|
if dir.loading {
|
||||||
dir.files = append(dir.files, &file{FileInfo: lstat})
|
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":
|
case "source":
|
||||||
if len(e.args) != 1 {
|
if len(e.args) != 1 {
|
||||||
app.ui.echoerr("source: requires an argument")
|
app.ui.echoerr("source: requires an argument")
|
||||||
|
|||||||
Reference in new issue
Block a user