Skip to content

Commit

Permalink
Merge pull request #20 from jreybert/fix_fugitive
Browse files Browse the repository at this point in the history
do not initialize plugin for non readable files
  • Loading branch information
justmao945 committed Oct 30, 2014
2 parents 81a2146 + 7150159 commit 7a3f57c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/clang.vim
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ au FileType c,cpp call <SID>ClangCompleteInit(0)
"}}}
"{{{ s:IsValidFile
func! s:IsValidFile()
return &filetype == "c" || &filetype == "cpp"
return ( &filetype == "c" || &filetype == "cpp" ) && filereadable(expand("%"))
endf
"}}}
"{{{ s:PDebug
Expand Down

0 comments on commit 7a3f57c

Please sign in to comment.