diff options
| author | bfredl <bjorn.linse@gmail.com> | 2026-09-17 11:58:37 +0200 |
|---|---|---|
| committer | bfredl <bjorn.linse@gmail.com> | 2026-09-22 12:31:48 +0200 |
| commit | 6be4cd6560d17573f9ef9910bae4360cf96d760f (patch) | |
| tree | 0bfaa2b079bdabeab610025ec9d9456c61dbd22c /runtime/lua/vim | |
| parent | ee5b7ef669956831abfa8c37a5b454abaaf07bcc (diff) | |
| download | rneovim-6be4cd6560d17573f9ef9910bae4360cf96d760f.tar.gz rneovim-6be4cd6560d17573f9ef9910bae4360cf96d760f.tar.bz2 rneovim-6be4cd6560d17573f9ef9910bae4360cf96d760f.zip | |
refactor(charset)!: delete 'isprint' and cleanup 'iskeyword' and friends
In the `enc=utf-8` only world, the 'isprint' option is quite obsolete.
The function is only consulted for decoded U+0080 to U+00FF chars
whose printability is defined by the unicode charset, just like
higher codepoints. Meanwhile, invalid `\x80` to `\xFF` bytes are always
unprintable.
Disentangle 'iskeyword', 'isfname' and 'isident' from each other by
giving them all separate bitsets. Now these can be updated individually.
These updaters can back out of errors gracefully, no need for extra
panic logic in option[str].c to restore partially updated chartabs.
Diffstat (limited to 'runtime/lua/vim')
| -rw-r--r-- | runtime/lua/vim/_meta/options.gen.lua | 33 | ||||
| -rw-r--r-- | runtime/lua/vim/_meta/vimfn.gen.lua | 2 |
2 files changed, 1 insertions, 34 deletions
diff --git a/runtime/lua/vim/_meta/options.gen.lua b/runtime/lua/vim/_meta/options.gen.lua index e6e1e372f4..2d4091596d 100644 --- a/runtime/lua/vim/_meta/options.gen.lua +++ b/runtime/lua/vim/_meta/options.gen.lua @@ -3753,39 +3753,6 @@ vim.o.isk = vim.o.iskeyword vim.bo.iskeyword = vim.o.iskeyword vim.bo.isk = vim.bo.iskeyword ---- The characters given by this option are displayed directly on the ---- screen. It is also used for "\p" in a `pattern`. The characters from ---- space (ASCII 32) to '~' (ASCII 126) are always displayed directly, ---- even when they are not included in 'isprint' or excluded. See ---- 'isfname' for a description of the format of this option. ---- ---- Non-printable characters are displayed with two characters: ---- 0 - 31 "^@" - "^_" ---- 32 - 126 always single characters ---- 127 "^?" ---- 128 - 159 "~@" - "~_" ---- 160 - 254 "| " - "|~" ---- 255 "~?" ---- Illegal bytes from 128 to 255 (invalid UTF-8) are ---- displayed as <xx>, with the hexadecimal value of the byte. ---- When 'display' contains "uhex" all unprintable characters are ---- displayed as <xx>. ---- The SpecialKey highlighting will be used for unprintable characters. ---- `hl-SpecialKey` ---- ---- Multi-byte characters 256 and above are always included, only the ---- characters up to 255 are specified with this option. When a character ---- is printable but it is not available in the current font, a ---- replacement character will be shown. ---- Unprintable and zero-width Unicode characters are displayed as <xxxx>. ---- There is no option to specify these characters. ---- ---- @type string -vim.o.isprint = "@,161-255" -vim.o.isp = vim.o.isprint -vim.go.isprint = vim.o.isprint -vim.go.isp = vim.go.isprint - --- Insert two spaces after a '.', '?' and '!' with a join command. --- Otherwise only one space is inserted. --- diff --git a/runtime/lua/vim/_meta/vimfn.gen.lua b/runtime/lua/vim/_meta/vimfn.gen.lua index 79577042b8..b5635078bd 100644 --- a/runtime/lua/vim/_meta/vimfn.gen.lua +++ b/runtime/lua/vim/_meta/vimfn.gen.lua @@ -10287,7 +10287,7 @@ function vim.fn.strptime(format, timestring) end function vim.fn.strridx(haystack, needle, start) end --- Translates all unprintable characters in {string} into ---- printable characters 'isprint', like they are shown in a +--- printable characters, like they are shown in a --- window. Example: >vim --- echo strtrans(\@a) --- <This displays a newline in register a as "^\@" instead of |