diff runtime/colors/tools/check_colors.vim @ 29779:90a966f5c77a

Update runtime files Commit: https://github.com/vim/vim/commit/e80086446cc20856ed8359bc8dc87c4d430da4c8 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 19 17:15:35 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Aug 2022 18:30:06 +0200
parents 82244cfc4694
children
line wrap: on
line diff
--- a/runtime/colors/tools/check_colors.vim
+++ b/runtime/colors/tools/check_colors.vim
@@ -6,10 +6,23 @@ vim9script
 def Test_check_colors()
     const savedview = winsaveview()
     cursor(1, 1)
-    var err = {}
+
+    # err is
+    # {
+    #    colors_name: "message",
+    #    init: "message",
+    #    background: "message",
+    #    ....etc
+    #    highlight: {
+    #       'Normal': "Missing ...",
+    #       'Conceal': "Missing ..."
+    #       ....etc
+    #    }
+    # }
+    var err: dict<any> = {}
 
     # 1) Check g:colors_name is existing
-    if !search('\<\%(g:\)\?colors_name\>', 'cnW')
+    if search('\<\%(g:\)\?colors_name\>', 'cnW') == 0
         err['colors_name'] = 'g:colors_name not set'
     else
         err['colors_name'] = 'OK'
@@ -180,11 +193,12 @@ def Test_check_colors()
     Result(err)
 enddef
 
-def Result(err: any)
+
+def Result(err: dict<any>)
     var do_groups: bool = v:false
     echohl Title | echomsg "---------------" | echohl Normal
     for key in sort(keys(err))
-        if key is 'highlight'
+        if key == 'highlight'
             do_groups = !empty(err[key])
             continue
         else