From d354117b72b3b43b75a29b8e816c0f91af10efe9 Mon Sep 17 00:00:00 2001 From: Matteo Landi Date: Tue, 22 Feb 2022 07:56:27 +0100 Subject: [PATCH] Don't skip acwrite buffers Prior to this change, the editorconfig-vim will skip processing any non-'normal' buffer, and the idea behind this is that we would not want it to mess around with, say, 'help' or 'quickfix' buffers. However, 'acwrite' buffers act pretty much like any other 'normal' buffer, with custom filetypes and all; the only difference is that 'acwrite' buffers will always be writtein with BufWriteCmd autocommands (see `:h buftype`). Because of this, I have changed editorconfig-vim to skip processing buffers which are not 'normal' (i.e., empty buftype), or 'acwrite'. --- plugin/editorconfig.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/editorconfig.vim b/plugin/editorconfig.vim index e491ce7c..d0deb265 100644 --- a/plugin/editorconfig.vim +++ b/plugin/editorconfig.vim @@ -368,7 +368,7 @@ endfunction " }}}2 function! s:ApplyConfig(config) abort " Set the buffer options {{{1 " Only process normal buffers (do not treat help files as '.txt' files) - if !empty(&buftype) + if index(['', 'acwrite'], &buftype) == -1 return endif