neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 4a2a54f993e8e3c2b4dfd687386847207033b631
parent 639734bed4efc9b17082886512442f1e89408a73
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Tue, 18 Feb 2025 06:59:34 +0800

vim-patch:5647c91: runtime(doc): add reference to extendnew() at extend() (#32500)

related: vim/vim#16607

https://github.com/vim/vim/commit/5647c91355f1ff3a1030c737bf5133bb7da5bb76

Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat:
Mruntime/doc/builtin.txt | 3++-
Mruntime/lua/vim/_meta/vimfn.lua | 3++-
Msrc/nvim/eval.lua | 3++-
3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt @@ -2167,7 +2167,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()* When {expr3} is omitted then "force" is assumed. {expr1} is changed when {expr2} is not empty. If necessary - make a copy of {expr1} first. + make a copy of {expr1} first or use |extendnew()| to return a + new List/Dictionary. {expr2} remains unchanged. When {expr1} is locked and {expr2} is not empty the operation fails. diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua @@ -1928,7 +1928,8 @@ function vim.fn.expandcmd(string, options) end --- When {expr3} is omitted then "force" is assumed. --- --- {expr1} is changed when {expr2} is not empty. If necessary ---- make a copy of {expr1} first. +--- make a copy of {expr1} first or use |extendnew()| to return a +--- new List/Dictionary. --- {expr2} remains unchanged. --- When {expr1} is locked and {expr2} is not empty the operation --- fails. diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua @@ -2481,7 +2481,8 @@ M.funcs = { When {expr3} is omitted then "force" is assumed. {expr1} is changed when {expr2} is not empty. If necessary - make a copy of {expr1} first. + make a copy of {expr1} first or use |extendnew()| to return a + new List/Dictionary. {expr2} remains unchanged. When {expr1} is locked and {expr2} is not empty the operation fails.