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.
diff --git a/src/eval.c b/src/eval.c
index 5d08854..0d83f1d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -25054,6 +25054,7 @@
char_u *tab;
int type = VAR_NUMBER;
typval_T tv;
+ funccall_T *save_funccal;
if (!writing && (find_viminfo_parameter('!') != NULL))
{
@@ -25100,7 +25101,11 @@
}
}
+ /* 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);