Mercurial > vim
diff src/evalvars.c @ 26057:92c424550367 v8.2.3562
patch 8.2.3562: cannot add color names
Commit: https://github.com/vim/vim/commit/e30d10253fa634c4f60daa798d029245f4eed393
Author: Drew Vogel <dvogel@github>
Date: Sun Oct 24 20:35:07 2021 +0100
patch 8.2.3562: cannot add color names
Problem: Cannot add color names.
Solution: Add the v:colornames dictionary. (Drew Vogel, closes https://github.com/vim/vim/issues/8761)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 24 Oct 2021 21:45:04 +0200 |
parents | 4003fc2340dc |
children | a60952e58e5d |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -149,6 +149,7 @@ static struct vimvar {VV_NAME("argv", VAR_LIST), VV_RO}, {VV_NAME("collate", VAR_STRING), VV_RO}, {VV_NAME("exiting", VAR_SPECIAL), VV_RO}, + {VV_NAME("colornames", VAR_DICT), VV_RO}, }; // shorthand @@ -248,6 +249,8 @@ evalvars_init(void) set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); + set_vim_var_dict(VV_COLORNAMES, dict_alloc()); + // Default for v:register is not 0 but '"'. This is adjusted once the // clipboard has been setup by calling reset_reg_var(). set_reg_var(0);