summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-01-15 04:32:39 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-01-15 04:33:03 +0900
commit2720816266013793da99f75df4ab90fb3f4013c2 (patch)
tree9448d53246a0086a241e56c9a0a4c69f1746aeea
parent5b68027bee72cf32d61795694a07750d6477ee92 (diff)
[vim] Use /dev/tty as STDIN when using --height w/o explicit source
-rw-r--r--plugin/fzf.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 9c9c6db0..d1a81fc5 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -428,7 +428,8 @@ function! s:execute(dict, command, use_height, temps) abort
let command = escaped
endif
if a:use_height
- call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s 2> /dev/tty', &lines, command))
+ let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
+ call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))
else
execute 'silent !'.command
endif