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
|
||||
|
||||
function! airline#parts#readonly()
|
||||
return &readonly ? g:airline_symbols.readonly : ''
|
||||
let buffer=winbufnr('')
|
||||
if &readonly && &modifiable && !filereadable(buffer)
|
||||
return '[noperm]'
|
||||
else
|
||||
return &readonly ? g:airline_symbols.readonly : ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#parts#filetype()
|
||||
|
Loading…
x
Reference in New Issue
Block a user