Add $FZF_POS environment variable

Close #2175
Close #3753
This commit is contained in:
Junegunn Choi
2024-04-27 18:56:23 +09:00
parent a4391aeedd
commit 2665580120
4 changed files with 21 additions and 0 deletions

View File

@@ -856,6 +856,7 @@ func (t *Terminal) environ() []string {
env = append(env, fmt.Sprintf("FZF_SELECT_COUNT=%d", len(t.selected)))
env = append(env, fmt.Sprintf("FZF_LINES=%d", t.areaLines))
env = append(env, fmt.Sprintf("FZF_COLUMNS=%d", t.areaColumns))
env = append(env, fmt.Sprintf("FZF_POS=%d", util.Min(t.merger.Length(), t.cy+1)))
return env
}