summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-04-28 11:24:59 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-04-28 11:46:24 +0900
commitb089bb5e7bdfbeb20b370731bd5ce14564df4318 (patch)
treec443fb51946b68103598d8c8f9413da40df04078 /src
parenta91a67668e0830a8cf9a792c4949e03b4189f097 (diff)
Fix scrollability of the preview window in certain cases
Fix #2683 This commit fixes the cases where fzf incorrectly determines the scrollability of the preview window when `--preview-window-wrap` is set. Wrapping of the preview content happens during the rendering phase, so it's currently not possible to know how many lines are actually needed to display the content beforehand. So `preview-bottom` still may not move to the very bottom with wrapping enabled.
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 90d2807a..3c13b373 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -1417,6 +1417,7 @@ func (t *Terminal) renderPreviewText(height int, lines []string, lineNo int, unc
line = strings.TrimSuffix(line, "\n")
if lineNo >= height || t.pwindow.Y() == height-1 && t.pwindow.X() > 0 {
t.previewed.filled = true
+ t.previewer.scrollable = true
break
} else if lineNo >= 0 {
var fillRet tui.FillReturn