1
0
forked from aniani/vim

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".
This commit is contained in:
Bram Moolenaar
2017-07-15 19:39:43 +02:00
parent a92522fbf3
commit c4da113ef9
13 changed files with 154 additions and 44 deletions

View File

@@ -1743,7 +1743,7 @@ static int viminfo_errcnt;
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 @@ viminfo_filename(char_u *file)
{
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