comparison 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
comparison
equal deleted inserted replaced
26056:977bbbf36908 26057:92c424550367
147 {VV_NAME("versionlong", VAR_NUMBER), VV_RO}, 147 {VV_NAME("versionlong", VAR_NUMBER), VV_RO},
148 {VV_NAME("echospace", VAR_NUMBER), VV_RO}, 148 {VV_NAME("echospace", VAR_NUMBER), VV_RO},
149 {VV_NAME("argv", VAR_LIST), VV_RO}, 149 {VV_NAME("argv", VAR_LIST), VV_RO},
150 {VV_NAME("collate", VAR_STRING), VV_RO}, 150 {VV_NAME("collate", VAR_STRING), VV_RO},
151 {VV_NAME("exiting", VAR_SPECIAL), VV_RO}, 151 {VV_NAME("exiting", VAR_SPECIAL), VV_RO},
152 {VV_NAME("colornames", VAR_DICT), VV_RO},
152 }; 153 };
153 154
154 // shorthand 155 // shorthand
155 #define vv_type vv_di.di_tv.v_type 156 #define vv_type vv_di.di_tv.v_type
156 #define vv_nr vv_di.di_tv.vval.v_number 157 #define vv_nr vv_di.di_tv.vval.v_number
245 set_vim_var_nr(VV_TYPE_JOB, VAR_TYPE_JOB); 246 set_vim_var_nr(VV_TYPE_JOB, VAR_TYPE_JOB);
246 set_vim_var_nr(VV_TYPE_CHANNEL, VAR_TYPE_CHANNEL); 247 set_vim_var_nr(VV_TYPE_CHANNEL, VAR_TYPE_CHANNEL);
247 set_vim_var_nr(VV_TYPE_BLOB, VAR_TYPE_BLOB); 248 set_vim_var_nr(VV_TYPE_BLOB, VAR_TYPE_BLOB);
248 249
249 set_vim_var_nr(VV_ECHOSPACE, sc_col - 1); 250 set_vim_var_nr(VV_ECHOSPACE, sc_col - 1);
251
252 set_vim_var_dict(VV_COLORNAMES, dict_alloc());
250 253
251 // Default for v:register is not 0 but '"'. This is adjusted once the 254 // Default for v:register is not 0 but '"'. This is adjusted once the
252 // clipboard has been setup by calling reset_reg_var(). 255 // clipboard has been setup by calling reset_reg_var().
253 set_reg_var(0); 256 set_reg_var(0);
254 } 257 }