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
|
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 : ''
|
||||||
|
|
Loading…
Reference in New Issue