From 93b8f61551724498a3dea9b084f89666185afb46 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 30 Apr 2017 11:18:56 +0900 Subject: [PATCH] [vim] Export $FZF_HEIGHT for previewer scripts Preview script cannot properly determine the height of fzf finder if `--height` option is used. https://github.com/junegunn/fzf.vim/issues/361 --- plugin/fzf.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 3eb1d0e3..126e16bf 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -379,7 +379,9 @@ try let use_term = 0 endif if use_height - let optstr .= ' --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 elseif use_term let optstr .= ' --no-height' endif