Merge pull request #1058 from blueyed/fix-1054
parts#readonly: fix filereadable check with #1054
This commit is contained in:
commit
5cf193fa28
|
@ -70,8 +70,7 @@ function! airline#parts#iminsert()
|
|||
endfunction
|
||||
|
||||
function! airline#parts#readonly()
|
||||
let buffer=winbufnr('')
|
||||
if &readonly && &modifiable && !filereadable(buffer)
|
||||
if &readonly && &modifiable && !filereadable(bufname('%'))
|
||||
return '[noperm]'
|
||||
else
|
||||
return &readonly ? g:airline_symbols.readonly : ''
|
||||
|
|
Loading…
Reference in New Issue