From 62ec2196015c4bcd0e55ac3a970a4668a655b930 Mon Sep 17 00:00:00 2001 From: kazukazuinaina Date: Wed, 23 Oct 2019 04:35:09 +0900 Subject: [PATCH] gina: Enable gina.vim, only for Vim > 7.4.1898 gina.vim needs the `` 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 --- autoload/airline/extensions.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions.vim b/autoload/airline/extensions.vim index 0d2ded71..55fed441 100644 --- a/autoload/airline/extensions.vim +++ b/autoload/airline/extensions.vim @@ -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 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()}' ]