Export FZF_PREVIEW_HEIGHT instead of FZF_HEIGHT

https://github.com/junegunn/fzf.vim/issues/361
This commit is contained in:
Junegunn Choi 2017-04-30 11:36:23 +09:00
parent 33f32de690
commit eba9e04e2e
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 1 additions and 1 deletions

View File

@ -380,7 +380,6 @@ try
endif endif
if use_height if use_height
let height = s:calc_size(&lines, dict.down, dict) let height = s:calc_size(&lines, dict.down, dict)
let $FZF_HEIGHT = height
let optstr .= ' --height='.height let optstr .= ' --height='.height
elseif use_term elseif use_term
let optstr .= ' --no-height' let optstr .= ' --no-height'

View File

@ -580,6 +580,7 @@ func (t *Terminal) resizeWindows() {
pwidth += 1 pwidth += 1
} }
t.pwindow = t.tui.NewWindow(y+1, x+2, pwidth, h-2, tui.BorderNone) t.pwindow = t.tui.NewWindow(y+1, x+2, pwidth, h-2, tui.BorderNone)
os.Setenv("FZF_PREVIEW_HEIGHT", strconv.Itoa(h-2))
} }
switch t.preview.position { switch t.preview.position {
case posUp: case posUp: