From 9194a9f02d89f4cf9a604e1004c8c96419afec34 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Mon, 26 Aug 2013 13:46:49 +0000 Subject: [PATCH] add temporary fix for vim-signify integration (#188). --- autoload/airline/extensions/hunks.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autoload/airline/extensions/hunks.vim b/autoload/airline/extensions/hunks.vim index 7190ad47..aa70b8cc 100644 --- a/autoload/airline/extensions/hunks.vim +++ b/autoload/airline/extensions/hunks.vim @@ -10,6 +10,14 @@ function! s:init() let s:initialized = 1 if get(g:, 'loaded_signify', 0) function! s:get_hunks() + " this is a temporary fix (see #188) + let fname = fnamemodify(bufname('%'), ':p') + if has_key(g:sy, fname) && has_key(g:sy[fname], 'hunks') + if len(g:sy[fname].hunks) == 0 + return [0, 0, 0] + endif + endif + let hunks = sy#repo#get_stats() if hunks[0] >= 0 return hunks