From b9a46fec3e79d1fc8c406084a41733c647a5e535 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 29 Jul 2016 18:13:42 +0200 Subject: patch 7.4.2115 Problem: Loading defaults.vim with -C argument. Solution: Don't load the defaults script with -C argument. Test sourcing the defaults script. Set 'display' to "truncate". --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index f24bda238..51e4483e3 100644 --- a/src/main.c +++ b/src/main.c @@ -90,6 +90,8 @@ static char *(main_errors[]) = static char_u *start_dir = NULL; /* current working dir on startup */ +static int has_dash_c_arg = FALSE; + int # ifdef VIMDLL _export @@ -1928,6 +1930,7 @@ command_line_scan(mparm_T *parmp) case 'C': /* "-C" Compatible */ change_compatible(TRUE); + has_dash_c_arg = TRUE; break; case 'e': /* "-e" Ex mode */ @@ -3001,7 +3004,7 @@ source_startup_scripts(mparm_T *parmp) #ifdef USR_EXRC_FILE2 && do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE) == FAIL #endif - ) + && !has_dash_c_arg) { /* When no .vimrc file was found: source defaults.vim. */ do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE); -- cgit v1.2.1