mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 20:18:28 +08:00
keep left override styles intact when inactive; use powerline separator for iminsert
This commit is contained in:
parent
86ff404748
commit
e4558340b0
|
@ -105,7 +105,7 @@ function! airline#update_statusline(active)
|
||||||
let l:file_flag_color = a:active ? "%#Al7#" : "%#Al7_inactive#"
|
let l:file_flag_color = a:active ? "%#Al7#" : "%#Al7_inactive#"
|
||||||
|
|
||||||
let sl = '%{airline#update_highlight()}'
|
let sl = '%{airline#update_highlight()}'
|
||||||
if a:active
|
if a:active || exists('w:airline_left_only')
|
||||||
let sl.=l:mode_color.' '.s:get_section('a').' '
|
let sl.=l:mode_color.' '.s:get_section('a').' '
|
||||||
let sl.='%{g:airline_detect_paste && &paste ? g:airline_paste_symbol." " : ""}'
|
let sl.='%{g:airline_detect_paste && &paste ? g:airline_paste_symbol." " : ""}'
|
||||||
let sl.=l:mode_sep_color
|
let sl.=l:mode_sep_color
|
||||||
|
@ -151,11 +151,10 @@ function! airline#update_highlight()
|
||||||
endif
|
endif
|
||||||
let g:airline_current_mode_text = get(g:airline_mode_map, l:m, l:m)
|
let g:airline_current_mode_text = get(g:airline_mode_map, l:m, l:m)
|
||||||
if g:airline_detect_iminsert && &iminsert
|
if g:airline_detect_iminsert && &iminsert
|
||||||
if exists('b:keymap_name')
|
if get(g:, 'airline_powerline_fonts', 0)
|
||||||
let g:airline_current_mode_text .= ' ' . toupper(b:keymap_name)
|
let g:airline_current_mode_text .= ' '.g:airline_left_alt_sep
|
||||||
else
|
|
||||||
let g:airline_current_mode_text .= ' LANG'
|
|
||||||
endif
|
endif
|
||||||
|
let g:airline_current_mode_text .= ' '.toupper(get(b:, 'keymap_name', 'lang'))
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let l:mode = ['inactive']
|
let l:mode = ['inactive']
|
||||||
|
|
|
@ -2,6 +2,7 @@ function! airline#extensions#apply_left_override(section1, section2)
|
||||||
let w:airline_section_a = a:section1
|
let w:airline_section_a = a:section1
|
||||||
let w:airline_section_b = a:section2
|
let w:airline_section_b = a:section2
|
||||||
let w:airline_section_c = ''
|
let w:airline_section_c = ''
|
||||||
|
let w:airline_section_gutter = ' '
|
||||||
let w:airline_left_only = 1
|
let w:airline_left_only = 1
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user