From 6be4cd6560d17573f9ef9910bae4360cf96d760f Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 17 Sep 2026 11:58:37 +0200 Subject: 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. --- test/functional/vimscript/json_functions_spec.lua | 6 ------ 1 file changed, 6 deletions(-) (limited to 'test/functional/vimscript/json_functions_spec.lua') diff --git a/test/functional/vimscript/json_functions_spec.lua b/test/functional/vimscript/json_functions_spec.lua index ed9a84083e..be37aa8e0d 100644 --- a/test/functional/vimscript/json_functions_spec.lua +++ b/test/functional/vimscript/json_functions_spec.lua @@ -972,12 +972,6 @@ describe('json_encode() function', function() ) end) - it('ignores improper values in &isprint', function() - api.nvim_set_option_value('isprint', '1', {}) - eq(1, eval('"\1" =~# "\\\\p"')) - eq('"\\u0001"', fn.json_encode('\1')) - end) - it('fails when using surrogate character in a UTF-8 string', function() eq( 'Vim(call):E474: UTF-8 string contains code point which belongs to a surrogate pair: \237\160\128', -- cgit