diff options
-rw-r--r-- | runtime/doc/builtin.txt | 3 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 3 | ||||
-rw-r--r-- | src/nvim/eval.lua | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 77d44c36a0..ae7fa8bcf9 100644 --- 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 index f4c395ce39..4970a3023b 100644 --- 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 index e454987e2b..1bb2bea502 100644 --- 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. |