Check for +cursorbind feature before using it

`+cursorbind` is not available with Vim on RHEL 6.1 for example.
This commit is contained in:
Daniel Hahler
2011-12-06 16:17:23 +01:00
committed by Tim Pope
parent c72a689f7f
commit fc0c98f5c0

View File

@@ -1228,7 +1228,9 @@ function! s:diffthis()
let w:fugitive_diff_restore .= &l:wrap ? ' wrap' : ' nowrap'
let w:fugitive_diff_restore .= ' foldmethod=' . &l:foldmethod
let w:fugitive_diff_restore .= ' foldcolumn=' . &l:foldcolumn
let w:fugitive_diff_restore .= (&l:cursorbind ? ' ' : ' no') . 'cursorbind'
if has('cursorbind')
let w:fugitive_diff_restore .= (&l:cursorbind ? ' ' : ' no') . 'cursorbind'
endif
diffthis
endif
endfunction