[GFiles?] Show diff in preview window

This commit is contained in:
Junegunn Choi 2016-10-11 15:45:20 +09:00
parent 5e3a3375c3
commit 61eb53199c
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -422,7 +422,7 @@ function! fzf#vim#gitfiles(args, ...)
let wrapped = fzf#wrap({
\ 'source': 'git -c color.status=always status --short',
\ 'dir': root,
\ 'options': '--ansi --multi --nth 2..,.. --prompt "GitFiles?> "'
\ 'options': '--ansi --multi --nth 2..,.. --prompt "GitFiles?> " --preview ''(git diff --color=always {-1} | sed 1,4d; cat {-1}) | head -500'''
\})
call s:remove_layout(wrapped)
let wrapped.common_sink = remove(wrapped, 'sink*')