diff --git a/autoload/airline/parts.vim b/autoload/airline/parts.vim index cc003ae0..eab96242 100644 --- a/autoload/airline/parts.vim +++ b/autoload/airline/parts.vim @@ -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 : ''