gina: Enable gina.vim, only for Vim > 7.4.1898

gina.vim needs the `<mods>` feature to work correctly. Therefore check
that Vim has at least patch 7.4.1898 included before using and accessing
the gina plugin.

fixes #1984
This commit is contained in:
kazukazuinaina 2019-10-23 04:35:09 +09:00 committed by Christian Brabandt
parent 6eda2735aa
commit 62ec219601
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ let s:filetype_overrides = {
\ 'vimshell': ['vimshell','%{vimshell#get_status_string()}'],
\ }
if exists(':Gina')
if exists(':Gina') && (v:version > 704 || (v:version == 704 && has("patch1898")))
" Gina needs the Vim 7.4.1898, which introduce the <mods> flag for custom commands
let s:filetype_overrides['gina-status'] = ['gina', '%{gina#component#repo#preset()}' ]
let s:filetype_overrides['diff'] = ['gina', '%{gina#component#repo#preset()}' ]
let s:filetype_overrides['gina-log'] = ['gina', '%{gina#component#repo#preset()}' ]