summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-06-19 02:55:37 +0200
committerBram Moolenaar <Bram@vim.org>2011-06-19 02:55:37 +0200
commit5f8949656acb8b2a850d59f685865938862e4f6d (patch)
treef5ea02a3df12d9c551d6ea5f6eb9c54a3c2e5929 /runtime
parentc16756d82968d31ec3927ff1320f5f8fa5d7dbf3 (diff)
updated for version 7.3.224v7.3.224
Problem: Can't pass dict to sort function. Solution: Add the optional {dict} argument to sort(). (ZyX)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index db5ae56360..01a59bf82f 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1919,7 +1919,8 @@ shellescape( {string} [, {special}])
simplify( {filename}) String simplify filename as much as possible
sin( {expr}) Float sine of {expr}
sinh( {expr}) Float hyperbolic sine of {expr}
-sort( {list} [, {func}]) List sort {list}, using {func} to compare
+sort( {list} [, {func} [, {dict}]])
+ List sort {list}, using {func} to compare
soundfold( {word}) String sound-fold {word}
spellbadword() String badly spelled word at cursor
spellsuggest( {word} [, {max} [, {capital}]])
@@ -5275,7 +5276,7 @@ sinh({expr}) *sinh()*
{only available when compiled with the |+float| feature}
-sort({list} [, {func}]) *sort()* *E702*
+sort({list} [, {func} [, {dict}]]) *sort()* *E702*
Sort the items in {list} in-place. Returns {list}. If you
want a list to remain unmodified make a copy first: >
:let sortedlist = sort(copy(mylist))
@@ -5283,6 +5284,8 @@ sort({list} [, {func}]) *sort()* *E702*
Numbers sort after Strings, |Lists| after Numbers.
For sorting text in the current buffer use |:sort|.
When {func} is given and it is one then case is ignored.
+ {dict} is for functions with the "dict" attribute. It will be
+ used to set the local variable "self". |Dictionary-function|
When {func} is a |Funcref| or a function name, this function
is called to compare items. The function is invoked with two
items as argument and must return zero if they are equal, 1 or