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:
@@ -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
|
||||
|
Reference in New Issue
Block a user