neovim/runtime/lua/vim/_meta
zeertzjq bc5dfda441
vim-patch:9.0.2041: trim(): hard to use default mask (#25692)
Problem:  trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified.  It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.

Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).

closes: vim/vim#13358

8079917447

vim-patch:9.0.2040: trim(): hard to use default mask

Problem:  trim(): hard to use default mask
Solution: Use default 'mask' when it is v:none

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

'v:none' is already used to mean "use the default argument value" in
user defined functions.  See |none-function_argument| in help.

closes: vim/vim#13363

6e6386716f

Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-10-18 06:08:14 +08:00
..
api_keysets.lua docs: miscellaneous doc and type fixes (#25554) 2023-10-10 06:34:48 +08:00
api.lua docs: miscellaneous doc and type fixes (#25554) 2023-10-10 06:34:48 +08:00
builtin_types.lua fix(builtin): fix incorrect optional fields for fn.sign_define 2023-08-30 07:51:26 +01:00
builtin.lua docs: update vim.schedule param name and type 2023-09-23 01:54:24 +10:00
diff.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
json.lua fix(meta): include vim.json 2023-09-22 23:02:45 +01:00
lpeg.lua fix(meta): add nil return types to lpeg functions 2023-09-26 09:43:44 +02:00
misc.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
mpack.lua fix: luacheck 2023-07-17 16:32:56 +01:00
options.lua vim-patch:9.0.2035: [security] use-after-free with wildmenu (#25687) 2023-10-17 22:43:42 +08:00
regex.lua docs: fix typos and other small fixes (#25005) 2023-09-14 12:05:27 +08:00
spell.lua docs: replace <pre> with ``` (#25136) 2023-09-14 08:23:01 -05:00
vimfn.lua vim-patch:9.0.2041: trim(): hard to use default mask (#25692) 2023-10-18 06:08:14 +08:00