mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-25 06:55:09 +02:00
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')
|
call add(l:mode, 'paste')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if &readonly
|
if &readonly || ! &modifiable
|
||||||
call add(l:mode, 'readonly')
|
call add(l:mode, 'readonly')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user