summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-04-30 11:18:56 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-04-30 11:18:56 +0900
commit93b8f61551724498a3dea9b084f89666185afb46 (patch)
tree19e9c3b2fd2f7759e617e363e52cbe714d481265 /plugin/fzf.vim
parentd5e72bf55d0bb317a3b9515885e92d94097b38fe (diff)
downloadfzf-93b8f61551724498a3dea9b084f89666185afb46.tar.gz
[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
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim4
1 files changed, 3 insertions, 1 deletions
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