Merge pull request #1058 from blueyed/fix-1054

parts#readonly: fix filereadable check with #1054
This commit is contained in:
Christian Brabandt 2016-02-25 08:18:49 +01:00
commit 5cf193fa28
1 changed files with 1 additions and 2 deletions

View File

@ -70,8 +70,7 @@ function! airline#parts#iminsert()
endfunction endfunction
function! airline#parts#readonly() function! airline#parts#readonly()
let buffer=winbufnr('') if &readonly && &modifiable && !filereadable(bufname('%'))
if &readonly && &modifiable && !filereadable(buffer)
return '[noperm]' return '[noperm]'
else else
return &readonly ? g:airline_symbols.readonly : '' return &readonly ? g:airline_symbols.readonly : ''