patch 8.0.0716: not easy to start Vim cleanly
Problem: Not easy to start Vim cleanly without changing the viminfo file.
Not possible to know whether the -i command line flag was used.
Solution: Add the --clean command line argument. Add the 'viminfofile'
option. Add "-u DEFAULTS".
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index a69a052..9c84e24 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1743,7 +1743,7 @@
no_viminfo(void)
{
/* "vim -i NONE" does not read or write a viminfo file */
- return (use_viminfo != NULL && STRCMP(use_viminfo, "NONE") == 0);
+ return STRCMP(p_viminfofile, "NONE") == 0;
}
/*
@@ -2093,8 +2093,8 @@
{
if (file == NULL || *file == NUL)
{
- if (use_viminfo != NULL)
- file = use_viminfo;
+ if (*p_viminfofile != NUL)
+ file = p_viminfofile;
else if ((file = find_viminfo_parameter('n')) == NULL || *file == NUL)
{
#ifdef VIMINFO_FILE2