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

pull/794/head
Junegunn Choi 7 years ago
parent 5b68027bee
commit 2720816266
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

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

Loading…
Cancel
Save