summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-15 19:39:43 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-15 19:39:43 +0200
commitc4da113ef98dcfd6f2a088b1693c0317dcb5bf42 (patch)
treebde8ae5c94f11e87cd89fed4e0c94416b830fedf /src/ex_cmds.c
parenta92522fbf3a49d06e08caf010f7d7b0f58d2e131 (diff)
downloadvim-git-c4da113ef98dcfd6f2a088b1693c0317dcb5bf42.tar.gz
patch 8.0.0716: not easy to start Vim cleanlyv8.0.0716
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".
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index a69a05268..9c84e24b1 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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