Skip to content

Commit

Permalink
[BUG] wildignore breaks Gdiff
Browse files Browse the repository at this point in the history
When the file you're editing matches the vim variable wildignore
Gdiff fails.  Saving/restoring &wildignore solves the problem.
  • Loading branch information
flatcap committed Mar 31, 2012
1 parent 3c641a7 commit 144842a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/fugitive.vim
Expand Up @@ -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()
Expand Down

0 comments on commit 144842a

Please sign in to comment.