Merge pull request #1054 from blueyed/file-noperm

Display [noperm] with modifiable, but not readable buffers
This commit is contained in:
Christian Brabandt 2016-02-24 22:26:53 +01:00
commit 5ab8b754d8

View File

@ -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()