mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-23 01:58:26 +08:00
make the mode and branch text window local
This commit is contained in:
@@ -168,9 +168,10 @@ function! airline#update_highlight()
|
||||
else
|
||||
let l:mode = ['normal']
|
||||
endif
|
||||
let g:airline_current_mode_text = get(g:airline_mode_map, l:m, l:m)
|
||||
let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
|
||||
else
|
||||
let l:mode = ['inactive']
|
||||
let w:airline_current_mode = get(g:airline_mode_map, '__')
|
||||
endif
|
||||
|
||||
if g:airline_detect_modified && &modified | call add(l:mode, 'modified') | endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
|
||||
function! airline#extensions#branch#apply()
|
||||
let g:airline_current_branch = exists('*fugitive#head') && strlen(fugitive#head()) > 0
|
||||
let w:airline_current_branch = exists('*fugitive#head') && strlen(fugitive#head()) > 0
|
||||
\ ? g:airline_branch_prefix.fugitive#head()
|
||||
\ : exists('*lawrencium#statusline') && strlen(lawrencium#statusline()) > 0
|
||||
\ ? g:airline_branch_prefix.lawrencium#statusline()
|
||||
|
||||
Reference in New Issue
Block a user