aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-15 21:15:36 +0200
committerGitHub <noreply@github.com>2019-04-15 21:15:36 +0200
commitaa82f8b88fe82077740894dd387801384e0558b6 (patch)
treeb03732aa27ed20915b0bc6440b28f16098f14922 /src/nvim/main.c
parent987619ddd73e792dc04b1a408b92cef2abb52bef (diff)
downloadrneovim-aa82f8b88fe82077740894dd387801384e0558b6.tar.gz
rneovim-aa82f8b88fe82077740894dd387801384e0558b6.tar.bz2
rneovim-aa82f8b88fe82077740894dd387801384e0558b6.zip
vim-patch:8.0.0716: "--clean", 'shadafile' #9907
Nvim notes: - Nvim does not support "-u DEFAULTS", that change is omitted. - Also add 'shadafile' as an alias to 'viminfofile'. - Deprecate 'viminfofile'. 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". https://github.com/vim/vim/commit/c4da113ef98dcfd6f2a088b1693c0317dcb5bf42
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 331cfc9f61..27e2abe1ad 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -871,6 +871,9 @@ static void command_line_scan(mparm_T *parmp)
} else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0) {
want_argument = true;
argv_idx += 11;
+ } else if (STRNICMP(argv[0] + argv_idx, "clean", 5) == 0) {
+ parmp->use_vimrc = "NONE";
+ set_option_value("shadafile", 0L, "NONE", 0);
} else {
if (argv[0][argv_idx])
mainerr(err_opt_unknown, argv[0]);
@@ -1129,7 +1132,7 @@ static void command_line_scan(mparm_T *parmp)
}
case 'i': { // "-i {shada}" use for shada
- used_shada_file = argv[0];
+ set_option_value("shadafile", 0L, argv[0], 0);
break;
}