From fc0c98f5c0533fe14da20516f901b933324130f3 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 6 Dec 2011 16:17:23 +0100 Subject: [PATCH] Check for `+cursorbind` feature before using it `+cursorbind` is not available with Vim on RHEL 6.1 for example. --- plugin/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 5931dbb..393bdab 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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