From c4da113ef98dcfd6f2a088b1693c0317dcb5bf42 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 15 Jul 2017 19:39:43 +0200 Subject: 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". --- src/ex_cmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ex_cmds.c') diff --git a/src/ex_cmds.c b/src/ex_cmds.c index a69a05268d..9c84e24b15 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 -- cgit v1.2.3