Merge pull request #1054 from blueyed/file-noperm
Display [noperm] with modifiable, but not readable buffers
This commit is contained in:
commit
5ab8b754d8
@ -70,7 +70,12 @@ function! airline#parts#iminsert()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#parts#readonly()
|
function! airline#parts#readonly()
|
||||||
|
let buffer=winbufnr('')
|
||||||
|
if &readonly && &modifiable && !filereadable(buffer)
|
||||||
|
return '[noperm]'
|
||||||
|
else
|
||||||
return &readonly ? g:airline_symbols.readonly : ''
|
return &readonly ? g:airline_symbols.readonly : ''
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#parts#filetype()
|
function! airline#parts#filetype()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user