mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 7.4.1131
Problem: New lines in the viminfo file are dropped. Solution: Copy lines starting with "|". Fix that when using :rviminfo in a function global variables were restored as function-local variables.
This commit is contained in:
@@ -25054,6 +25054,7 @@ read_viminfo_varlist(virp, writing)
|
||||
char_u *tab;
|
||||
int type = VAR_NUMBER;
|
||||
typval_T tv;
|
||||
funccall_T *save_funccal;
|
||||
|
||||
if (!writing && (find_viminfo_parameter('!') != NULL))
|
||||
{
|
||||
@@ -25100,7 +25101,11 @@ read_viminfo_varlist(virp, writing)
|
||||
}
|
||||
}
|
||||
|
||||
/* when in a function use global variables */
|
||||
save_funccal = current_funccal;
|
||||
current_funccal = NULL;
|
||||
set_var(virp->vir_line + 1, &tv, FALSE);
|
||||
current_funccal = save_funccal;
|
||||
|
||||
if (tv.v_type == VAR_STRING)
|
||||
vim_free(tv.vval.v_string);
|
||||
|
Reference in New Issue
Block a user