add readonly mode so it can be themed independently. resolves #510
This commit is contained in:
parent
c5347b2f03
commit
bfcece76c9
|
@ -148,16 +148,18 @@ function! airline#check_mode(winnr)
|
|||
let w:airline_current_mode = get(g:airline_mode_map, '__')
|
||||
endif
|
||||
|
||||
if g:airline_detect_modified
|
||||
if &modified
|
||||
call add(l:mode, 'modified')
|
||||
endif
|
||||
if g:airline_detect_modified && &modified
|
||||
call add(l:mode, 'modified')
|
||||
endif
|
||||
|
||||
if g:airline_detect_paste && &paste
|
||||
call add(l:mode, 'paste')
|
||||
endif
|
||||
|
||||
if &readonly
|
||||
call add(l:mode, 'readonly')
|
||||
endif
|
||||
|
||||
let mode_string = join(l:mode)
|
||||
if get(w:, 'airline_lastmode', '') != mode_string
|
||||
call airline#highlighter#highlight_modified_inactive(context.bufnr)
|
||||
|
|
Loading…
Reference in New Issue