comparison src/viminfo.c @ 17922:4d63d47d87ef v8.1.1957

patch 8.1.1957: more code can be moved to evalvars.c Commit: https://github.com/vim/vim/commit/da6c03342117fb7f4a8110bd9e8627b612a05a64 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 1 16:01:30 2019 +0200 patch 8.1.1957: more code can be moved to evalvars.c Problem: More code can be moved to evalvars.c. Solution: Move code to where it fits better. (Yegappan Lakshmanan, closes #4883)
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Sep 2019 16:15:03 +0200
parents 9efb4dda9720
children a5de1d88590d
comparison
equal deleted inserted replaced
17921:14be395d672c 17922:4d63d47d87ef
1275 * Write global vars that start with a capital to the viminfo file 1275 * Write global vars that start with a capital to the viminfo file
1276 */ 1276 */
1277 static void 1277 static void
1278 write_viminfo_varlist(FILE *fp) 1278 write_viminfo_varlist(FILE *fp)
1279 { 1279 {
1280 hashtab_T *gvht = get_globvar_ht();
1280 hashitem_T *hi; 1281 hashitem_T *hi;
1281 dictitem_T *this_var; 1282 dictitem_T *this_var;
1282 int todo; 1283 int todo;
1283 char *s = ""; 1284 char *s = "";
1284 char_u *p; 1285 char_u *p;
1288 if (find_viminfo_parameter('!') == NULL) 1289 if (find_viminfo_parameter('!') == NULL)
1289 return; 1290 return;
1290 1291
1291 fputs(_("\n# global variables:\n"), fp); 1292 fputs(_("\n# global variables:\n"), fp);
1292 1293
1293 todo = (int)globvarht.ht_used; 1294 todo = (int)gvht->ht_used;
1294 for (hi = globvarht.ht_array; todo > 0; ++hi) 1295 for (hi = gvht->ht_array; todo > 0; ++hi)
1295 { 1296 {
1296 if (!HASHITEM_EMPTY(hi)) 1297 if (!HASHITEM_EMPTY(hi))
1297 { 1298 {
1298 --todo; 1299 --todo;
1299 this_var = HI2DI(hi); 1300 this_var = HI2DI(hi);