Skip to content

Commit

Permalink
Don't skip acwrite buffers
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
iamFIREcracker authored and cxw42 committed Jun 20, 2022
1 parent a8e3e66 commit d354117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/editorconfig.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d354117

Please sign in to comment.