Closed h3xx closed 2 years ago
I've already created another fix to this issue: #186
Interesting. I'm also thinking that BOM's in .editorconfig
files are such an edgecase that it may not be worth it to support it. (YAGNI)
Closed in favor of #186, a much more comprehensive fix.
Tested against changes in #186, and it in fact fixes the issue described in this PR.
For some reason, this plugin is causing
:e
to change the file's encoding option (&fileencoding
) to utf-8, overriding whatever it's currently set to.This doesn't happen upon first opening the file, but only upon re-opening it with
:e
. Probably because the script executes beforeThis weird fix works apparently due to some weird vim internal discrepancy between how
set enc
andlet &enc
work. Usinglet
seems to also mess with the file's encoding (&fileencoding
).I should mention I was editing a file that did not have any .editorconfig settings applied to it.
Steps to reproduce:
&fenc
should still belatin1
. If it was reset toutf-8
the issue persists.Closes #145