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:
parent
ad19d1a10f
commit
7c65176499
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue