add try catch in gina.vim's extension in branch.vim

This commit is contained in:
kazukazuinaina 2019-12-15 23:08:31 +09:00
parent 72286b27cc
commit d4e2bfe892
1 changed files with 5 additions and 2 deletions

View File

@ -98,8 +98,11 @@ function! s:update_git_branch()
let s:vcs_config['git'].branch='mas'
endif
else
let g:gina#component#repo#commit_length = s:sha1size
let s:vcs_config['git'].branch = gina#component#repo#branch()
try
let g:gina#component#repo#commit_length = s:sha1size
let s:vcs_config['git'].branch = gina#component#repo#branch()
catch
endtry
if s:vcs_config['git'].branch is# 'master' &&
\ airline#util#winwidth() < 81
" Shorten default a bit