aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-04-25 03:56:33 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-25 03:56:33 -0400
commit588bc1d9586bc65b63519bc9d292fa4ab59b2dba (patch)
treee1cb76952f7dc0008ba9f2fc11d13da80d9a94e2 /runtime/doc/eval.txt
parent121e76db6f2dd2a088ba0fabd17fd80425347d50 (diff)
parent1addc45e78155a73f52a00762cb77abbd3f8d993 (diff)
downloadrneovim-588bc1d9586bc65b63519bc9d292fa4ab59b2dba.tar.gz
rneovim-588bc1d9586bc65b63519bc9d292fa4ab59b2dba.tar.bz2
rneovim-588bc1d9586bc65b63519bc9d292fa4ab59b2dba.zip
Merge #4303 'vim-patch:7.4.{951,1143,1144}'.
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 148ac7732a..f6bdde2d39 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6144,6 +6144,10 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
strtod() function to parse numbers, Strings, Lists, Dicts and
Funcrefs will be considered as being 0).
+ When {func} is given and it is 'N' then all items will be
+ sorted numerical. This is like 'n' but a string containing
+ digits will be used as the number they represent.
+
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
@@ -6158,6 +6162,11 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
on numbers, text strings will sort next to each other, in the
same order as they were originally.
+ The sort is stable, items which compare equal (as number or as
+ string) will keep their relative position. E.g., when sorting
+ on numbers, text strings will sort next to each other, in the
+ same order as they were originally.
+
Also see |uniq()|.
Example: >