fix: allow skipped previews to be reloaded (#2292)
* fix: allow skipped previews to be reloaded * Update `CHANGELOG.md`
This commit is contained in:
1 parent
a9dbaa9dd1
commit
7727b28fbe
2 files changed
+7
-1
No files matched your search
@@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|||||||
- `Added`
|
- `Added`
|
||||||
- `Fixed`
|
- `Fixed`
|
||||||
|
|
||||||
|
## r40 (Unreleased)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- A bug where file previews fail to load properly when scrolling quickly is now fixed (#2292).
|
||||||
|
|
||||||
## [r39](https://github.com/gokcehan/lf/releases/tag/r39)
|
## [r39](https://github.com/gokcehan/lf/releases/tag/r39)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -930,7 +930,7 @@ func (nav *nav) preview(path string, win *win, mode string) {
|
|||||||
|
|
||||||
func (nav *nav) loadReg(path string, volatile bool) *reg {
|
func (nav *nav) loadReg(path string, volatile bool) *reg {
|
||||||
r, ok := nav.regCache[path]
|
r, ok := nav.regCache[path]
|
||||||
if !ok {
|
if !ok || (!gOpts.preload && r.loading) {
|
||||||
r = ®{loading: true, loadTime: time.Now(), path: path}
|
r = ®{loading: true, loadTime: time.Now(), path: path}
|
||||||
nav.regCache[path] = r
|
nav.regCache[path] = r
|
||||||
nav.startPreview()
|
nav.startPreview()
|
||||||
|
|||||||
Reference in new issue
Block a user