Add `readonly` indicator also for !&modifiable

While typically both are set (e.g. with `:help`), I am using the
modifiable setting alone to prevent editing of some files via an
autocommand (`*.css`, if `*.scss` exists).

I can also set `readonly` for this buffer, but that gets reset when
reloading the buffer, which is not the case for `modifiable`.
This commit is contained in:
Daniel Hahler 2014-08-28 00:16:26 +02:00
parent ad19d1a10f
commit 7c65176499
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ function! airline#check_mode(winnr)
call add(l:mode, 'paste')
endif
if &readonly
if &readonly || ! &modifiable
call add(l:mode, 'readonly')
endif