summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-03-09 22:06:49 +0000
committerBram Moolenaar <Bram@vim.org>2023-03-09 22:06:49 +0000
commitbe19d78c3d44221cbc38fbb5bac19302345c1def (patch)
tree1a1e07ad5501f660705c69190d76526e1acae4e6 /runtime
parent638388b8ef37684e36a7f5d9286bab2d31c28f36 (diff)
downloadvim-git-be19d78c3d44221cbc38fbb5bac19302345c1def.tar.gz
patch 9.0.1396: sort(list, 'N') does not work in Vim9 script contextv9.0.1396
Problem: sort(list, 'N') does not work in Vim9 script context. Solution: Convert string to number without giving an error. (closes #12061)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index a695547ee..da2bf32f7 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -8641,8 +8641,9 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E702*
When {how} is given and it is 'n' then all items will be
sorted numerical (Implementation detail: this uses the
- strtod() function to parse numbers, Strings, Lists, Dicts and
- Funcrefs will be considered as being 0).
+ strtod() function to parse numbers. Strings, Lists, Dicts and
+ Funcrefs will be considered as being 0). Note that this won't
+ sort a list of strings with numbers!
When {how} is given and it is 'N' then all items will be
sorted numerical. This is like 'n' but a string containing