From 144842a5bbef33a193fb05e0a882d333c5139a41 Mon Sep 17 00:00:00 2001 From: "Richard Russon (flatcap)" Date: Sat, 31 Mar 2012 15:27:55 +0100 Subject: [PATCH] [BUG] wildignore breaks Gdiff When the file you're editing matches the vim variable wildignore Gdiff fails. Saving/restoring &wildignore solves the problem. --- plugin/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index c790f7e99e..2367d9f019 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1359,11 +1359,14 @@ function! s:Diff(bang,...) try let spec = s:repo().translate(file) let commit = matchstr(spec,'\C[^:/]//\zs\x\+') + let oldwig = &wildignore + let &wildignore = "" if s:buffer().compare_age(commit) < 0 execute 'rightbelow '.split.' `=spec`' else execute 'leftabove '.split.' `=spec`' endif + let &wildignore = oldwig call s:diffthis() wincmd p call s:diffthis()