diff options
author | Max Christian Pohle | 2021-10-03 13:58:49 +0200 |
---|---|---|
committer | Max Christian Pohle | 2021-10-03 13:58:49 +0200 |
commit | a1334a8a83f0a8f19256d7062e872a46c78fe3fc (patch) | |
tree | 6b140c835d2d2249c61786d8eea4485d7b81daf9 /plugin | |
parent | b94eb99ad75d95219bd7100f66eb964709515d20 (diff) | |
download | vim-fancy-line-a1334a8a83f0a8f19256d7062e872a46c78fe3fc.tar.bz2 vim-fancy-line-a1334a8a83f0a8f19256d7062e872a46c78fe3fc.zip |
Removed dependency to fugitive
Diffstat (limited to 'plugin')
-rwxr-xr-x | plugin/vim-fancy-line.vim | 8 |
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 @@ | |||
1 | scriptencoding utf-8 | 1 | scriptencoding utf-8 |
2 | 2 | ||
3 | augroup MAX_FANCYLINE | 3 | augroup 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 |