diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-19 17:15:35 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-19 17:15:35 +0100 |
commit | e80086446cc20856ed8359bc8dc87c4d430da4c8 (patch) | |
tree | 2ec2710297c314efa0530ca3f24cbb99de21679c /runtime/colors/tools | |
parent | 13ed494bb5edc5a02d0ed0feabddb68920f88570 (diff) |
Update runtime files
Diffstat (limited to 'runtime/colors/tools')
-rw-r--r-- | runtime/colors/tools/check_colors.vim | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/runtime/colors/tools/check_colors.vim b/runtime/colors/tools/check_colors.vim index 7ff671caaa..c3fb2264e8 100644 --- 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 |