Skip to content

Commit 7727b28

Browse files
authored
fix: allow skipped previews to be reloaded (gokcehan#2292)
* fix: allow skipped previews to be reloaded * Update `CHANGELOG.md`
1 parent a9dbaa9 commit 7727b28

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
88
- `Added`
99
- `Fixed`
1010

11+
## r40 (Unreleased)
12+
13+
### Fixed
14+
15+
- A bug where file previews fail to load properly when scrolling quickly is now fixed (#2292).
16+
1117
## [r39](https://github.com/gokcehan/lf/releases/tag/r39)
1218

1319
### Changed

nav.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ func (nav *nav) preview(path string, win *win, mode string) {
930930

931931
func (nav *nav) loadReg(path string, volatile bool) *reg {
932932
r, ok := nav.regCache[path]
933-
if !ok {
933+
if !ok || (!gOpts.preload && r.loading) {
934934
r = &reg{loading: true, loadTime: time.Now(), path: path}
935935
nav.regCache[path] = r
936936
nav.startPreview()

0 commit comments

Comments
 (0)