diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index b60182c..b677c2e 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -102,8 +102,13 @@ function! airline#highlighter#add_accent(group, accent) let mode_colors = kvp[1] if has_key(mode_colors, a:group) let colors = copy(mode_colors[a:group]) - let colors[0] = p.accents[a:accent][0] - let colors[2] = p.accents[a:accent][2] + if p.accents[a:accent][0] != '' + let colors[0] = p.accents[a:accent][0] + endif + if p.accents[a:accent][2] != '' + let colors[2] = p.accents[a:accent][2] + endif + let colors[4] = get(p.accents[a:accent], 4, '') let mode_colors[a:group.'_'.a:accent] = colors endif endfor diff --git a/autoload/airline/init.vim b/autoload/airline/init.vim index c245f03..07ea2ce 100644 --- a/autoload/airline/init.vim +++ b/autoload/airline/init.vim @@ -67,6 +67,7 @@ function! airline#init#bootstrap() \ 'accent': 'red', \ }) call airline#parts#define_raw('file', '%f%m') + call airline#parts#define_raw('linenr', (g:airline_symbols.linenr).' %#airline_accent_bold#%3l%#__restore__#') call airline#parts#define_function('ffenc', 'airline#parts#ffenc') call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', 'whitespace']) endfunction @@ -91,7 +92,7 @@ function! airline#init#sections() let g:airline_section_y = airline#section#create_right(['ffenc']) endif if !exists('g:airline_section_z') - let g:airline_section_z = airline#section#create_right(['%3p%% %{g:airline_symbols.linenr} %3l:%3c ']) + let g:airline_section_z = airline#section#create(['%3p%% ', 'linenr', ':%3c ']) endif if !exists('g:airline_section_warning') let g:airline_section_warning = airline#section#create(['syntastic', 'whitespace'])