From 7c6517649993237dabb8dfa9dbab49ce44ac2b9c Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 28 Aug 2014 00:16:26 +0200 Subject: [PATCH] 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`. --- autoload/airline.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index b4a88817..81cf3b5f 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -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