mirror of
https://github.com/junegunn/fzf.git
synced 2025-07-26 01:31:59 -07:00
Fix case where preview window is not scrollable (#4258)
When the last rendered line was wrapped, fzf would incorrectly determine the scrollability of the window.
This commit is contained in:
@@ -3384,8 +3384,10 @@ func (t *Terminal) renderPreviewText(height int, lines []string, lineNo int, unc
|
||||
wiped := false
|
||||
image := false
|
||||
wireframe := false
|
||||
var index int
|
||||
var line string
|
||||
Loop:
|
||||
for _, line := range lines {
|
||||
for index, line = range lines {
|
||||
var lbg tui.Color = -1
|
||||
if ansi != nil {
|
||||
ansi.lbg = -1
|
||||
@@ -3528,6 +3530,7 @@ Loop:
|
||||
}
|
||||
lineNo++
|
||||
}
|
||||
t.previewer.scrollable = t.previewer.scrollable || index < len(lines)-1
|
||||
t.previewed.image = image
|
||||
t.previewed.wireframe = wireframe
|
||||
}
|
||||
|
Reference in New Issue
Block a user