diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-12 20:23:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-12 20:23:40 +0100 |
commit | b0e6b513648db7035046613431a4aa9d71ef4653 (patch) | |
tree | ed9c3fdd71d7c70c7289f0e48a88296067e21352 /runtime/doc/eval.txt | |
parent | 7cd24227c02afdb4249db406e2174eda1e6b36b4 (diff) | |
download | vim-git-b0e6b513648db7035046613431a4aa9d71ef4653.tar.gz |
patch 8.2.2336: Vim9: not possible to extend dictionary with different typev8.2.2336
Problem: Vim9: it is not possible to extend a dictionary with different
item types.
Solution: Add extendnew(). (closes #7666)
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7848534b5..d31ba2d36 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2524,6 +2524,9 @@ expand({expr} [, {nosuf} [, {list}]]) expandcmd({expr}) String expand {expr} like with `:edit` extend({expr1}, {expr2} [, {expr3}]) List/Dict insert items of {expr2} into {expr1} +extendnew({expr1}, {expr2} [, {expr3}]) + List/Dict like |extend()| but creates a new + List or Dictionary feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer filereadable({file}) Number |TRUE| if {file} is a readable file filewritable({file}) Number |TRUE| if {file} is a writable file @@ -4520,6 +4523,13 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()* mylist->extend(otherlist) +extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()* + Like |extend()| but instead of adding items to {expr1} a new + List or Dictionary is created and returned. {expr1} remains + unchanged. Items can still be changed by {expr2}, if you + don't want that use |deepcopy()| first. + + feedkeys({string} [, {mode}]) *feedkeys()* Characters in {string} are queued for processing as if they come from a mapping or were typed by the user. |