diff options
| author | bfredl <bjorn.linse@gmail.com> | 2025-05-17 16:41:58 +0200 |
|---|---|---|
| committer | bfredl <bjorn.linse@gmail.com> | 2025-05-17 17:01:09 +0200 |
| commit | 9a322f8103a9e6fb13e3d896f45abfc19396daac (patch) | |
| tree | 33dda9b232b008de5655f534fb1739002cbb7df6 /runtime/lua/vim/_extui/shared.lua | |
| parent | 81bb7613f9bea87896046960af8cd61e6ec4c9b9 (diff) | |
| download | rneovim-9a322f8103a9e6fb13e3d896f45abfc19396daac.tar.gz rneovim-9a322f8103a9e6fb13e3d896f45abfc19396daac.tar.bz2 rneovim-9a322f8103a9e6fb13e3d896f45abfc19396daac.zip | |
refactor(helptags): remove useless homegrown encoding check
This check was always broken. it will "detect" a file as
other-than-UTF-8 if the first line of a help file only is ASCII.
This only works by accident, as all our help files are UTF-8 (or
ASCII-only, which is fully compatible), but are all ASCII-only
on the first line of every help file which means that all helpfiles
gets detected as not-UTF8 which makes the "consistency" test pass
by accident even though the actual consistency is that every single
file is UTF-8 compatible. This means that the
"!_TAG_FILE_ENCODING\tutf-8\t" meta-tag already did not get emitted
but YAGNI in either case as no encoding tag just means that 'encoding'
is used which in neovim always is UTF-8 anyway.
An alternative approach would be to integrate the real encoding
detection already present in the codebase (an editor which edits text of
various encodings) which checks the entire file instead of a weird
first-line-only-hack, but as it happens to be 2025 the resolution of
encoding trouble is to just use UTF-8 everywhere. And if you use something
else you have to keep track yourself anyway it is not like we can detect
if one helpfile of your plugin is latin-1 and another is latin-2 or
whatever. Also, Nvim will detect the encoding of the file when you open
the file as a :help buffer anyway.
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
0 files changed, 0 insertions, 0 deletions