mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 19:43:46 -05:00
Check for +cursorbind feature before using it
`+cursorbind` is not available with Vim on RHEL 6.1 for example.
This commit is contained in:
@@ -1228,7 +1228,9 @@ function! s:diffthis()
|
|||||||
let w:fugitive_diff_restore .= &l:wrap ? ' wrap' : ' nowrap'
|
let w:fugitive_diff_restore .= &l:wrap ? ' wrap' : ' nowrap'
|
||||||
let w:fugitive_diff_restore .= ' foldmethod=' . &l:foldmethod
|
let w:fugitive_diff_restore .= ' foldmethod=' . &l:foldmethod
|
||||||
let w:fugitive_diff_restore .= ' foldcolumn=' . &l:foldcolumn
|
let w:fugitive_diff_restore .= ' foldcolumn=' . &l:foldcolumn
|
||||||
|
if has('cursorbind')
|
||||||
let w:fugitive_diff_restore .= (&l:cursorbind ? ' ' : ' no') . 'cursorbind'
|
let w:fugitive_diff_restore .= (&l:cursorbind ? ' ' : ' no') . 'cursorbind'
|
||||||
|
endif
|
||||||
diffthis
|
diffthis
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user