mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-15 14:53:47 -05:00
Restore scroll after rendering full-height Sixel image (#2544)
When a Sixel image touches the bottom of the screen, the whole screen
scrolls up one line to make room for the cursor. Add an ANSI escape
code to compensate for the movement. Unfortunately, the movement of the
screen is sometimes noticeable.
fzf --preview='fzf-preview.sh {}' --preview-window border-left
This commit is contained in:
@@ -2061,7 +2061,10 @@ Loop:
|
|||||||
|
|
||||||
if requiredLines > 0 {
|
if requiredLines > 0 {
|
||||||
if y+requiredLines == height {
|
if y+requiredLines == height {
|
||||||
t.pwindow.Move(y+requiredLines, 0)
|
if t.tui.MaxY() == t.pwindow.Top()+height {
|
||||||
|
t.tui.PassThrough("\x1b[1T")
|
||||||
|
}
|
||||||
|
t.pwindow.Move(height-1, maxWidth-1)
|
||||||
t.previewed.filled = true
|
t.previewed.filled = true
|
||||||
break Loop
|
break Loop
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user