File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11" The default vimrc file.
22"
33" Maintainer: Bram Moolenaar <[email protected] >4- " Last change: 2016 Jul 28
4+ " Last change: 2016 Jul 29
55"
66" This is loaded if no vimrc file was found.
77" Except when Vim is run with "-u NONE" or "-C".
@@ -25,6 +25,9 @@ set ruler " show the cursor position all the time
2525set showcmd " display incomplete commands
2626set wildmenu " display completion matches in a status line
2727
28+ " Show @@@ in the last line if it is truncated.
29+ set display = truncate
30+
2831" Do incremental searching when it's possible to timeout.
2932if has (' reltime' )
3033 set incsearch
Original file line number Diff line number Diff line change @@ -2107,6 +2107,7 @@ test_arglist \
21072107 test_regexp_utf8 \
21082108 test_reltime \
21092109 test_ruby \
2110+ test_startup \
21102111 test_searchpos \
21112112 test_set \
21122113 test_sort \
Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ static char *(main_errors[]) =
9090
9191static char_u * start_dir = NULL ; /* current working dir on startup */
9292
93+ static int has_dash_c_arg = FALSE;
94+
9395 int
9496# ifdef VIMDLL
9597_export
@@ -1928,6 +1930,7 @@ command_line_scan(mparm_T *parmp)
19281930
19291931 case 'C ': /* "-C" Compatible */
19301932 change_compatible (TRUE );
1933+ has_dash_c_arg = TRUE;
19311934 break ;
19321935
19331936 case 'e ': /* "-e" Ex mode */
@@ -3001,7 +3004,7 @@ source_startup_scripts(mparm_T *parmp)
30013004#ifdef USR_EXRC_FILE2
30023005 && do_source ((char_u * )USR_EXRC_FILE2 , FALSE, DOSO_NONE ) == FAIL
30033006#endif
3004- )
3007+ && ! has_dash_c_arg )
30053008 {
30063009 /* When no .vimrc file was found: source defaults.vim. */
30073010 do_source ((char_u * )VIM_DEFAULTS_FILE , FALSE, DOSO_NONE );
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ NEW_TESTS = test_arglist.res \
184184 test_perl.res \
185185 test_quickfix.res \
186186 test_ruby.res \
187+ test_startup.res \
187188 test_stat.res \
188189 test_syntax.res \
189190 test_textobjects.res \
Original file line number Diff line number Diff line change 1+ " Check that loading startup.vim works.
2+
3+ func Test_startup_script ()
4+ set compatible
5+ source $VIMRUNTIME /defaults.vim
6+
7+ call assert_equal (0 , &compatible )
8+ endfunc
Original file line number Diff line number Diff line change @@ -758,6 +758,8 @@ static char *(features[]) =
758758
759759static int included_patches [] =
760760{ /* Add new patch number below this line */
761+ /**/
762+ 2115 ,
761763/**/
762764 2114 ,
763765/**/
You can’t perform that action at this time.
0 commit comments