From 37c0222c1eb00d2ea88ca4bf8f732b71d6bcf986 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 7 Oct 2021 17:00:38 +0200 Subject: Fixed errors with git detached head also fixed :help vim-fancy-line --- plugin/vim-fancy-line.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin') diff --git a/plugin/vim-fancy-line.vim b/plugin/vim-fancy-line.vim index 9b6ff55..bfa5e1c 100755 --- a/plugin/vim-fancy-line.vim +++ b/plugin/vim-fancy-line.vim @@ -108,8 +108,8 @@ augroup MAX_FANCY_LINE function! UpdateTabline(highlight_group) let l:invert_group = CreateInvertGroup(a:highlight_group) - let l:git_branch = systemlist('git branch --show-current')[0] - let l:git_branch = v:shell_error ? "" : g:status_sym_sep_start . ' ' . g:symbol_branch . ' ' . l:git_branch + let l:git_branch = systemlist('git branch --show-current') + let l:git_branch = (v:shell_error || l:git_branch == []) ? "" : g:status_sym_sep_start . ' ' . g:symbol_branch . ' ' . l:git_branch[0] return '' \ .'%#'.a:highlight_group.'#' -- cgit v1.2.3