[vim] Use /dev/tty as STDIN when using --height w/o explicit source

This commit is contained in:
Junegunn Choi 2017-01-15 04:32:39 +09:00
parent 5b68027bee
commit 2720816266
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -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