Mercurial > vim
diff runtime/doc/eval.txt @ 31383:15c80d8bc515
Update runtime files
Commit: https://github.com/vim/vim/commit/86b4816766d976a7ecd4403eca1f8bf6b4105800
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 6 18:20:10 2022 +0000
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 06 Dec 2022 19:30:06 +0100 |
parents | a7801222c9c5 |
children | e5e95e8c78a7 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.0. Last change: 2022 Nov 22 +*eval.txt* For Vim version 9.0. Last change: 2022 Dec 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -633,6 +633,10 @@ This removes all entries from "dict" wit This can also be used to remove all entries: > call filter(dict, 0) +In some situations it is not allowed to remove or add entries to a Dictionary. +Especially when iterating over all the entries. You will get *E1313* or +another error in that case. + Dictionary function ~ *Dictionary-function* *self* *E725* *E862* @@ -646,7 +650,8 @@ special way with a dictionary. Example: This is like a method in object oriented programming. The entry in the Dictionary is a |Funcref|. The local variable "self" refers to the dictionary -the function was invoked from. +the function was invoked from. When using |Vim9| script you can use classes +and objects, see `:class`. It is also possible to add a function without the "dict" attribute as a Funcref to a Dictionary, but the "self" variable is not available then.