summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-29 18:13:42 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-29 18:13:42 +0200
commitb9a46fec3e79d1fc8c406084a41733c647a5e535 (patch)
tree01df635eb1f9a9b086b92b88f239933de4f0db08 /src/main.c
parentd05b191b91c4e16d6887bf781832d135d2a8fae5 (diff)
downloadvim-git-b9a46fec3e79d1fc8c406084a41733c647a5e535.tar.gz
patch 7.4.2115v7.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".
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
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);