aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2021-10-03 13:58:49 +0200
committerMax Christian Pohle2021-10-03 13:58:49 +0200
commita1334a8a83f0a8f19256d7062e872a46c78fe3fc (patch)
tree6b140c835d2d2249c61786d8eea4485d7b81daf9
parentb94eb99ad75d95219bd7100f66eb964709515d20 (diff)
downloadvim-fancy-line-a1334a8a83f0a8f19256d7062e872a46c78fe3fc.tar.bz2
vim-fancy-line-a1334a8a83f0a8f19256d7062e872a46c78fe3fc.zip
Removed dependency to fugitive
-rwxr-xr-xplugin/vim-fancy-line.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugin/vim-fancy-line.vim b/plugin/vim-fancy-line.vim
index 8ec97a2..9b6ff55 100755
--- a/plugin/vim-fancy-line.vim
+++ b/plugin/vim-fancy-line.vim
@@ -1,6 +1,6 @@
1scriptencoding utf-8 1scriptencoding utf-8
2 2
3augroup MAX_FANCYLINE 3augroup MAX_FANCY_LINE
4 set noshowmode | " mode would otherwise be shown twice- in lightline and below. We want to deactivate one. 4 set noshowmode | " mode would otherwise be shown twice- in lightline and below. We want to deactivate one.
5 set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split 5 set laststatus=2 | " required by AirLine and Lightline, without status line does not appear until a window split
6 6
@@ -108,7 +108,9 @@ augroup MAX_FANCYLINE
108 108
109 function! UpdateTabline(highlight_group) 109 function! UpdateTabline(highlight_group)
110 let l:invert_group = CreateInvertGroup(a:highlight_group) 110 let l:invert_group = CreateInvertGroup(a:highlight_group)
111 let l:git_branch = FugitiveHead() 111 let l:git_branch = systemlist('git branch --show-current')[0]
112 let l:git_branch = v:shell_error ? "" : g:status_sym_sep_start . ' ' . g:symbol_branch . ' ' . l:git_branch
113
112 return '' 114 return ''
113 \ .'%#'.a:highlight_group.'#' 115 \ .'%#'.a:highlight_group.'#'
114 \ .g:symbol_screen_edge 116 \ .g:symbol_screen_edge
@@ -117,7 +119,7 @@ augroup MAX_FANCYLINE
117 \ .'%-2( %)' 119 \ .'%-2( %)'
118 \ .'%{fnamemodify(getcwd(-1), ":~")}' 120 \ .'%{fnamemodify(getcwd(-1), ":~")}'
119 \ .' ' 121 \ .' '
120 \ .'%{FugitiveHead() == "" ? "" : g:status_sym_sep_start." ".g:symbol_branch." ".FugitiveHead()}' 122 \ .l:git_branch
121 \ .' ' 123 \ .' '
122 \ .'%#'.l:invert_group.'#' 124 \ .'%#'.l:invert_group.'#'
123 \ .g:status_sym_end 125 \ .g:status_sym_end
..