aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | | | | Merge pull request #25882 from bfredl/noundobfredl2023-11-05
| |\ \ \ \ \ | | | | | | | | | | | | | | feat(extmarks): add "no_undo_restore" flag to opt out of undo-restoring
| | * | | | | feat(extmarks): add "undo_restore" flag to opt out of undo-restoringbfredl2023-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a design goal of extmarks that they allow precise tracking of changes across undo/redo, including restore the exact positions after a do/undo or undo/redo cycle. However this behavior is not useful for all usecases. Many plugins won't keep marks around for long after text changes, but uses them more like a cache until some external source (like LSP semantic highlights) has fully updated to changed text and then will explicitly readjust/replace extmarks as needed. Add a "undo_restore" flag which is true by default (matches existing behavior) but can be set to false to opt-out of this behavior. Delete dead u_extmark_set() code.
| * | | | | | refactor: combine regexp filesdundargoc2023-11-05
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regext_bt.c and regexp_nfa.c are inlined into regexp.c instead of included as a header. This makes developer tools like clang-tidy and clangd be able to understand the code better.
| * | | | | build: various cmake fixesdundargoc2023-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - silence false warnings on MSVC - merge `clang-tidy` cmake target into `lintc` and remove the corresponding make target - use cmake's built-in endianness detection
| * | | | | vim-patch:9.0.2090: complete_info() skips entries with 'noselect' (#25890)zeertzjq2023-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: complete_info() skips entries with 'noselect' Solution: Check, if first entry is at original text state Unfortunately, Commit daef8c74375141974d61b85199b383017644978c introduced a regression, that when ':set completeopt+=noselect' is set and no completion item has been selected yet, it did not fill the complete_info['items'] list. This happened, because the current match item did not have the CP_ORIGINAL_TEXT flag set and then the cp->prev pointer did point to the original flag item, which caused the following while loop to not being run but being skipped instead. So when the 'noselect' is set, only start with to the previous selection item, if the initial completion item has the CP_ORIGINAL_TEXT flag set, else use the 2nd previous item instead. fixes: vim/vim#13451 closes: vim/vim#13452 https://github.com/vim/vim/commit/57f9ce1a0977da13e5923214086795ffa2d28ce1 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | fix(rpc): "grid_line" event parsing crashes (#25581)LW2023-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refactor: use a more idiomatic loop to iterate over the cells There are two cases in which the following assertion would fail: ```c assert(g->icell < g->ncells); ``` 1. If `g->ncells = 0`. Update this to be legal. 2. If an EOF is reached while parsing `wrap`. In this case, the unpacker attempts to resume from `cells`, which is a bug. Create a new state for parsing `wrap`. Reference: https://neovim.io/doc/user/ui.html#ui-event-grid_line
| * | | | | refactor(grid): implement rightleftcmd as a post-processing stepbfredl2023-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, 'rightleftcmd' was implemented by having all code which would affect msg_col or output screen cells be conditional on `cmdmsg_rl`. This change removes all that and instead implements rightleft as a mirroring post-processing step.
| * | | | | build: make the vimdoc generation depend on the nvim target (#25876)Gregory Anders2023-11-02
| | | | | | | | | | | | | | | | | | | | | | | | The gen_vimdoc.py script uses the nvim executable, so the executable must be built before running the script.
| * | | | | build: use built nvim artifact to generate eval files (#25875)Gregory Anders2023-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where the generated files depend on changes to Nvim itself, generating the files with an older version of Nvim will fail because those changes are not present in the older version. For example, if a new option is added then the generator script should be run with the version of Nvim that contains the new option, or else the generation will fail. Co-authored-by: dundargoc <gocdundar@gmail.com>
| * | | | | Merge pull request #25859 from luukvbaal/extmarkdelbfredl2023-11-02
| |\ \ \ \ \ | | | | | | | | | | | | | | refactor(extmarks): extmark_del() with MarkTreeIter
| | * | | | | refactor(extmarks): extmark_del() with MarkTreeIterLuuk van Baal2023-11-01
| | | | | | |
| * | | | | | build: set char to always be signeddundargoc2023-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sticking to the same convention makes it easier to reason about the code and reduces complexity.
| * | | | | | fix(startup): trigger UIEnter for the correct channel (#25860)zeertzjq2023-11-01
| | | | | | |
| * | | | | | feat(server): allow embed with listen (#25709)George Harker2023-11-01
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connection from any channel or stdio will unblock remote_ui_wait_for_attach. Wait on stdio only if only —embed specified, if both —embed and —listen then wait on any channel.
| * | | | | fix(base64): only check padding if leftover index is set (#25854)Gregory Anders2023-10-31
| | | | | |
| * | | | | feat(stdlib): add vim.base64 module (#25843)Gregory Anders2023-10-31
| | | | | | | | | | | | | | | | | | Add base64 encode() and decode() functions to a vim.base64 module.
| * | | | | Merge pull request #25850 from famiu/refactor/option/stringbfredl2023-10-31
| |\ \ \ \ \ | | | | | | | | | | | | | | refactor(options): remove `os_doskip`
| | * | | | | refactor(options): remove `os_doskip`Famiu Haque2023-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `os_doskip` seems to be unnecessary since everything that sets it to true also returns an error, and `errmsg` being non-`NULL` already skips most of the processing. Solution: Remove `os_doskip`.
| * | | | | | fix(terminal): keep focus when scrolling number column of another window ↵zeertzjq2023-10-31
| |/ / / / / | | | | | | | | | | | | | | | | | | (#25848)
| * | | | | fix(terminal): don't lose focus on <MouseMove> (#25845)zeertzjq2023-10-31
| | | | | |
| * | | | | refactor(options)!: unify `set_option` and `set_string_option`Famiu Haque2023-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the interfaces for setting number and boolean options are now unified by #25394, there is still a separate `set_string_option` function that is used for setting a string option. This PR removes that function and merges it with set_option. BREAKING CHANGE: `v:option_old` is now the old global value for all global-local options, instead of just string global-local options. Local value for a global-local number/boolean option is now unset when the option is set (e.g. using `:set` or `nvim_set_option_value`) without a scope, which means they now behave the same way as string options. Ref: #25672
| * | | | | docs: small fixes (#25585)dundargoc2023-10-29
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
| * | | | | fix(api): load buffer first on nvim_buf_set_lines (#25823)Raphael2023-10-29
| | | | | | | | | | | | | | | | | | | | | | | | Fix #22670 Fix #8659
| * | | | | fix(terminal): avoid Insert mode in Terminal buffer (#25820)zeertzjq2023-10-29
| | | | | |
| * | | | | vim-patch:8ebdbc9e6d80 (#25816)zeertzjq2023-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): all secure options should note this restriction in the documentation (vim/vim#13448) Problem: Not all secure options document their status Solution: Describe secure context :set restrictions in each help entry https://github.com/vim/vim/commit/8ebdbc9e6d80b707c2b2d923e702dc86bf902923 Co-authored-by: dkearns <dougkearns@gmail.com>
| * | | | | vim-patch:9.0.2081: smoothscroll may result in wrong cursor position (#25815)luukvbaal2023-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'. Resulting in incorrect calculation of the cursor position. Solution: Reset "w_skipcol" when unsetting 'wrap'. fixes: vim/vim#12970 closes: vim/vim#13439 https://github.com/vim/vim/commit/1bf1bf569b96d2f9b28e0cce0968ffbf2fb80aac
| * | | | | build: bump required minimum libvterm version to 0.3.3dundargoc2023-10-28
| | | | | | | | | | | | | | | | | | | | | | | | Also add detection for libvterm patch version.
| * | | | | vim-patch:9.0.2075: TextChangedI may not always trigger (#25808)zeertzjq2023-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: TextChangedI may not always trigger Solution: trigger it in more cases: for insert/ append/change operations, and when opening a new line, fixes: vim/vim#13367 closes: vim/vim#13375 https://github.com/vim/vim/commit/4bca4897a12dfb91b3b27e3083fd5f370bd857d1 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | vim-patch:9.0.2070: [security] disallow setting env in restricted mode (#25807)zeertzjq2023-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security] disallow setting env in restricted mode Solution: Setting environment variables in restricted mode could potentially be used to execute shell commands. Disallow this. restricted mode: disable allow setting of environment variables Setting environment variables in restricted mode, may have some unwanted consequences. So, for example by setting $GCONV_PATH in restricted mode and then calling the iconv() function, one may be able to execute some unwanted payload, because the `iconv_open()` function internally uses the `$GCONV_PATH` variable to find its conversion data. So let's disable setting environment variables, even so this is no complete protection, since we are not clearing the existing environment. I tried a few ways but wasn't successful :( One could also argue to disable the iconv() function completely in restricted mode, but who knows what other API functions can be influenced by setting some other unrelated environment variables. So let's leave it as it is currently. closes: vim/vim#13394 See: https://huntr.com/bounties/b0a2eda1-459c-4e36-98e6-0cc7d7faccfe/ https://github.com/vim/vim/commit/6b89dd6a7257a1e2e9c7ea070b407bc4674a5118 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | vim-patch:9.0.2074: Completion menu may be wrongzeertzjq2023-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Completion menu may be wrong Solution: Check for the original direction of the completion menu, add more tests, make it work with 'noselect' completion: move in right direction when filling completion_info() When moving through the insert completion menu and switching directions, we need to make sure we start at the correct position in the list and move correctly forward/backwards through it, so that we do not skip entries and the selected item points to the correct entry in the list of completion entries generated by the completion_info() function. The general case is this: 1) CTRL-X CTRL-N, we will traverse the list starting from compl_first_match and then go forwards (using the cp->next pointer) through the list (skipping the very first entry, which has the CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry 2) CTRL-X CTRL-P, we will traverse the list starting from compl_first_match (which now points to the last entry). The previous entry will have the CP_ORIGINAL_TEXT flag set, so we need to start traversing the list from the second prev pointer. There are in fact 2 special cases after starting the completion menu with CTRL-X: 3) CTRL-N and then going backwards by pressing CTRL-P again. compl_first_match will point to the same entry as in step 1 above, but since compl_dir_foward() has been switched by pressing CTRL-P to backwards we need to pretend to be in still in case 1 and still traverse the list in forward direction using the cp_next pointer 4) CTRL-P and then going forwards by pressing CTRL-N again. compl_first_match will point to the same entry as in step 2 above, but since compl_dir_foward() has been switched by pressing CTRL-N to forwards we need to pretend to be in still in case 2 and still traverse the list in backward direction using the cp_prev pointer For the 'noselect' case however, this is slightly different again. When going backwards, we only need to go one cp_prev pointer back. And resting of the direction works again slightly different. So we need to take the noselect option into account when deciding in which direction to iterate through the list of matches. related: vim/vim#13402 related: vim/vim#12971 closes: vim/vim#13408 https://github.com/vim/vim/commit/daef8c74375141974d61b85199b383017644978c Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | vim-patch:9.0.2068: [security] overflow in :history (#25794)zeertzjq2023-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security] overflow in :history Solution: Check that value fits into int The get_list_range() function, used to parse numbers for the :history and :clist command internally uses long variables to store the numbers. However function arguments are integer pointers, which can then overflow. Check that the return value from the vim_str2nr() function is not larger than INT_MAX and if yes, bail out with an error. I guess nobody uses a cmdline/clist history that needs so many entries... (famous last words). It is only a moderate vulnerability, so impact should be low. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a N/A patch: vim-patch:9.0.2073: typo in quickfix.c comments Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | fix(float): win_get_bordertext_col returning negative column number (#25752)nwounkn2023-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `win_get_bordertext_col` returns column < 1 for right or center aligned text, if its length is more than window width. Solution: Return max(resulting_column, 1)
| * | | | | vim-patch:9.0.2064: cannot use buffer-number for errorformat (#25782)zeertzjq2023-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot use buffer-number for errorformat Solution: add support for parsing a buffer number using '%b' in 'errorformat' closes: vim/vim#13419 https://github.com/vim/vim/commit/b731800522af00fd348814d33a065b92e698afc3 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | | | | vim-patch:partial:5985879e3c36 (#25780)zeertzjq2023-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): Fix typos in several documents (vim/vim#13420) * Fix typos in several documents * Update runtime/doc/terminal.txt https://github.com/vim/vim/commit/5985879e3c36383155f84649fa42d06813a1893e Skip runtime/doc/indent.txt: not ported yet Co-authored-by: h_east <h.east.727@gmail.com> Co-authored-by: K.Takata <kentkt@csc.jp>
| * | | | | vim-patch:9.0.2065: EXPAND flag set for filetype option (#25779)zeertzjq2023-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: EXPAND flag set for filetype option Solution: Remove P_EXPAND flag from the 'filetype' option Remove P_EXPAND flag from the 'filetype' option Problem: P_EXPAND flag is erroneously set for 'filetype' option Solution: Remove the P_EXPAND flag This flag is used by string options that accept file path values. See :help set_env. This appears to have been included in d5e8c92 and resulted from an incorrect implementation of 'filetype' completion. See vim/vim#12900 for a small discussion. related: vim/vim#12900 closes: vim/vim#13416 https://github.com/vim/vim/commit/3932072ab435eb171ab55b2a2c0185358cd0d7bf Co-authored-by: Doug Kearns <dougkearns@gmail.com>
| * | | | | fix(terminal): assign channel to terminal earlier (#25771)zeertzjq2023-10-25
| | | | | |
| * | | | | fix(marks): handle switching buffer properly (#25763)zeertzjq2023-10-24
| | | | | |
| * | | | | build(lint): remove unnecessary clint.py rulesdundargoc2023-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py.
| * | | | | fix(options): `'modified'` showing incorrect value for scratch buffersFamiu Haque2023-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: #25716 removed the logic for getting the correct value of the `'modified'` option when using `nvim_buf_get_option()`. So the function now returns an incorrect value of `'modified'` for scratch buffers. Solution: Re-add the logic for getting the correct value of `'modified'`. Also make it so that the logic only exists in one place instead of being duplicated across multiple places in the code.
| * | | | | feat(complete): support f flag for complete buffer partglepnir2023-10-21
| | | | | |
| * | | | | vim-patch:9.0.2059: outstanding exceptions may be skipped (#25736)zeertzjq2023-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: outstanding exceptions may be skipped Solution: When restoring exception state, process remaining outstanding exceptions closes: vim/vim#13386 https://github.com/vim/vim/commit/0ab500dede4edd8d5aee7ddc63444537be527871 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | | | | feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
| | | | | |
| * | | | | fix(event-loop): flush UI when no input is available (#25728)zeertzjq2023-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: With lots of events, UI flush may be delayed for too long. Solution: Flush UI when no input is available. This still flushes less frequently than before #25629, when a flush also happens when typeahead buffer is empty but input is available.
| * | | | | refactor(options): `get_option_value_strict()` and `SREQ_*`Famiu Haque2023-10-20
| | | | | | | | | | | | | | | | | | | | | | | | `SREQ_*` values are now actual typedef'd enums. `get_option_value_strict()` has also been refactored and split into two functions, `get_option_attrs()` for getting the option attributes, and `get_option_value_strict()` for getting the actual value. Moreover, it now returns an `OptVal`. Other miscellaneous refactors have also been made.
| * | | | | vim-patch:9.0.2056: no digraph for quadruple primeChristian Clason2023-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: no digraph for quadruple prime Solution: add quadruple prime digraph using 4' closes: vim/vim#13380 https://github.com/vim/vim/commit/47416d1a7441f8c815438903e78ba0a2d877699e Co-authored-by: Jonathan Wright <quaggy@gmail.com>
| * | | | | vim-patch:9.0.2050: Vim9: crash with deferred function call and exception ↵zeertzjq2023-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25715) Problem: Vim9: crash with deferred function call and exception Solution: Save and restore exception state Crash when a deferred function is called after an exception and another exception is thrown closes: vim/vim#13376 closes: vim/vim#13377 https://github.com/vim/vim/commit/c59c1e0d88651a71ece7366e418f1253abbe2a28 The change in check_due_timer() is N/A as Nvim calls timer callbacks on the main loop. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | | | | vim-patch:9.0.2044: Vim9: exceptions confuse defered functionszeertzjq2023-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: exceptions confuse defered functions Solution: save and restore exception state when calling defered functions closes: vim/vim#13364 closes: vim/vim#13372 https://github.com/vim/vim/commit/0672595fd50e9ae668676a40e28ebf66d7f52392 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | | | | build: add sub-targets to the doc targetdundargoc2023-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's easier to debug and to customize scripting if there are sub-targets that build up each target.
| * | | | | fix(move): check the correct buffer (#25698)zeertzjq2023-10-18
| | | | | |
| * | | | | vim-patch:9.0.2041: trim(): hard to use default mask (#25692)zeertzjq2023-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 https://github.com/vim/vim/commit/8079917447e7436dccc2e4cd4a4a56ae0a4712f2 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 https://github.com/vim/vim/commit/6e6386716f9494ae86027c6d34f657fd03dfec42 Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>