diff runtime/menu.vim @ 27859:3cb1a109e987 v8.2.4455

patch 8.2.4455: accepting one and zero for second sort() argument is strange Commit: https://github.com/vim/vim/commit/2007dd49f5cb36f944cab1cfbceb0f864e625f74 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 23 13:17:47 2022 +0000 patch 8.2.4455: accepting one and zero for second sort() argument is strange Problem: Accepting one and zero for the second sort() argument is strange. Solution: Disallow using one and zero in Vim9 script.
author Bram Moolenaar <Bram@vim.org>
date Wed, 23 Feb 2022 14:30:03 +0100
parents 179c118424a6
children c968191a8557
line wrap: on
line diff
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
 " You can also use this as a start for your own set of menus.
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2022 Feb 04
+" Last Change:	2022 Feb 23
 
 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
 " in all modes and avoid side effects from mappings defined by the user.
@@ -378,7 +378,7 @@ def s:SetupColorSchemes()
   n += globpath(&packpath, "pack/*/opt/*/colors/*.vim", 1, 1)
 
   # Ignore case for VMS and windows, sort on name
-  var names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)
+  var names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 'i')
 
   # define all the submenu entries
   var idx = 100