parts#readonly: fix filereadable check with #1054

This commit is contained in:
Daniel Hahler 2016-02-25 02:57:49 +01:00
parent 5ab8b754d8
commit 595d270398
1 changed files with 1 additions and 2 deletions

View File

@ -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 : ''