diff options
Diffstat (limited to 'plugin/statusline.vim')
-rw-r--r-- | plugin/statusline.vim | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/plugin/statusline.vim b/plugin/statusline.vim index e6f175d..57fbfa4 100644 --- a/plugin/statusline.vim +++ b/plugin/statusline.vim | |||
@@ -14,18 +14,17 @@ augroup MAX_FANCYLINE | |||
14 | if &term ==? 'linux' | 14 | if &term ==? 'linux' |
15 | let g:group_active = 'StatusLineTerm' | 15 | let g:group_active = 'StatusLineTerm' |
16 | let g:group_inactive = 'StatusLineTermNC' | 16 | let g:group_inactive = 'StatusLineTermNC' |
17 | let g:group_tabline = 'StatusLineTerm' | 17 | let g:group_tabline = 'TabLine' |
18 | else | 18 | else |
19 | let g:group_active = 'StatusLine' | 19 | let g:group_active = 'StatusLine' |
20 | let g:group_inactive = 'StatusLineNC' | 20 | let g:group_inactive = 'StatusLineNC' |
21 | " let g:group_tabline = 'TabLine' | 21 | let g:group_tabline = 'TabLine' |
22 | let g:group_tabline = 'StatusLine' | ||
23 | endif | 22 | endif |
24 | 23 | ||
25 | " this function reverts foreground color and background color of a given | 24 | " this function reverts foreground color and background color of a given |
26 | " highlight group and returns the name of a newly created _invert group | 25 | " highlight group and returns the name of a newly created _invert group |
27 | function! CreateInvertGroup(highlight_group) | 26 | function! CreateInvertGroup(highlight_group) |
28 | if(synIDattr(hlID(a:highlight_group), 'reverse')==1) | 27 | if(synIDattr(synIDtrans(hlID(a:highlight_group)), 'reverse', 'cterm')==1) |
29 | let w:color=synIDattr(hlID(a:highlight_group), 'fg#') | 28 | let w:color=synIDattr(hlID(a:highlight_group), 'fg#') |
30 | else | 29 | else |
31 | let w:color=synIDattr(hlID(a:highlight_group), 'bg#') | 30 | let w:color=synIDattr(hlID(a:highlight_group), 'bg#') |
@@ -124,6 +123,12 @@ augroup MAX_FANCYLINE | |||
124 | \ .'%##' | 123 | \ .'%##' |
125 | endfunction | 124 | endfunction |
126 | 125 | ||
126 | |||
127 | if $USER ==? 'root' | ||
128 | let invert_group = CreateInvertGroup("ErrorMsg") | ||
129 | let g:group_tabline = invert_group | ||
130 | endif | ||
131 | |||
127 | function! ApplyColorScheme() | 132 | function! ApplyColorScheme() |
128 | " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incompatible with nvim | 133 | " set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) incompatible with nvim |
129 | " set t_ut= | 134 | " set t_ut= |