summaryrefslogtreecommitdiffstats
path: root/src/terminal.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-11-02 01:35:36 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-11-02 01:35:36 +0900
commit21ab64e96213ec99cf3f6f207690ffe710713fcc (patch)
tree3d1ebb4ea016827751987abff3f6890d137682f9 /src/terminal.go
parenta0145cebf284898fce182d78a1edae7270d16f57 (diff)
sixel: Export $FZF_PREVIEW_TOP to the preview command (#2544)
So that it can determine if it should subtract 1 from $FZF_PREVIEW_LINES to avoid scrolling issue of Sixel image that touches the bottom of the screen.
Diffstat (limited to 'src/terminal.go')
-rw-r--r--src/terminal.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 494fa462..878e3d9a 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -2067,9 +2067,6 @@ Loop:
if requiredLines > 0 {
if y+requiredLines == height {
- if t.tui.MaxY() == t.pwindow.Top()+height {
- t.tui.PassThrough("\x1b[1T")
- }
t.pwindow.Move(height-1, maxWidth-1)
t.previewed.filled = true
break Loop
@@ -2790,6 +2787,8 @@ func (t *Terminal) Loop() {
env = append(env, "FZF_PREVIEW_"+lines)
env = append(env, columns)
env = append(env, "FZF_PREVIEW_"+columns)
+ env = append(env, fmt.Sprintf("FZF_PREVIEW_TOP=%d", t.tui.Top()+t.pwindow.Top()))
+ env = append(env, fmt.Sprintf("FZF_PREVIEW_LEFT=%d", t.pwindow.Left()))
}
cmd.Env = env