mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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".
This commit is contained in:
parent
d05b191b91
commit
b9a46fec3e
@ -1,7 +1,7 @@
|
|||||||
" The default vimrc file.
|
" The default vimrc file.
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last change: 2016 Jul 28
|
" Last change: 2016 Jul 29
|
||||||
"
|
"
|
||||||
" This is loaded if no vimrc file was found.
|
" This is loaded if no vimrc file was found.
|
||||||
" Except when Vim is run with "-u NONE" or "-C".
|
" Except when Vim is run with "-u NONE" or "-C".
|
||||||
@ -25,6 +25,9 @@ set ruler " show the cursor position all the time
|
|||||||
set showcmd " display incomplete commands
|
set showcmd " display incomplete commands
|
||||||
set wildmenu " display completion matches in a status line
|
set wildmenu " display completion matches in a status line
|
||||||
|
|
||||||
|
" Show @@@ in the last line if it is truncated.
|
||||||
|
set display=truncate
|
||||||
|
|
||||||
" Do incremental searching when it's possible to timeout.
|
" Do incremental searching when it's possible to timeout.
|
||||||
if has('reltime')
|
if has('reltime')
|
||||||
set incsearch
|
set incsearch
|
||||||
|
@ -2107,6 +2107,7 @@ test_arglist \
|
|||||||
test_regexp_utf8 \
|
test_regexp_utf8 \
|
||||||
test_reltime \
|
test_reltime \
|
||||||
test_ruby \
|
test_ruby \
|
||||||
|
test_startup \
|
||||||
test_searchpos \
|
test_searchpos \
|
||||||
test_set \
|
test_set \
|
||||||
test_sort \
|
test_sort \
|
||||||
|
@ -90,6 +90,8 @@ static char *(main_errors[]) =
|
|||||||
|
|
||||||
static char_u *start_dir = NULL; /* current working dir on startup */
|
static char_u *start_dir = NULL; /* current working dir on startup */
|
||||||
|
|
||||||
|
static int has_dash_c_arg = FALSE;
|
||||||
|
|
||||||
int
|
int
|
||||||
# ifdef VIMDLL
|
# ifdef VIMDLL
|
||||||
_export
|
_export
|
||||||
@ -1928,6 +1930,7 @@ command_line_scan(mparm_T *parmp)
|
|||||||
|
|
||||||
case 'C': /* "-C" Compatible */
|
case 'C': /* "-C" Compatible */
|
||||||
change_compatible(TRUE);
|
change_compatible(TRUE);
|
||||||
|
has_dash_c_arg = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e': /* "-e" Ex mode */
|
case 'e': /* "-e" Ex mode */
|
||||||
@ -3001,7 +3004,7 @@ source_startup_scripts(mparm_T *parmp)
|
|||||||
#ifdef USR_EXRC_FILE2
|
#ifdef USR_EXRC_FILE2
|
||||||
&& do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE) == FAIL
|
&& do_source((char_u *)USR_EXRC_FILE2, FALSE, DOSO_NONE) == FAIL
|
||||||
#endif
|
#endif
|
||||||
)
|
&& !has_dash_c_arg)
|
||||||
{
|
{
|
||||||
/* When no .vimrc file was found: source defaults.vim. */
|
/* When no .vimrc file was found: source defaults.vim. */
|
||||||
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE);
|
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE);
|
||||||
|
@ -184,6 +184,7 @@ NEW_TESTS = test_arglist.res \
|
|||||||
test_perl.res \
|
test_perl.res \
|
||||||
test_quickfix.res \
|
test_quickfix.res \
|
||||||
test_ruby.res \
|
test_ruby.res \
|
||||||
|
test_startup.res \
|
||||||
test_stat.res \
|
test_stat.res \
|
||||||
test_syntax.res \
|
test_syntax.res \
|
||||||
test_textobjects.res \
|
test_textobjects.res \
|
||||||
|
8
src/testdir/test_startup.vim
Normal file
8
src/testdir/test_startup.vim
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
" Check that loading startup.vim works.
|
||||||
|
|
||||||
|
func Test_startup_script()
|
||||||
|
set compatible
|
||||||
|
source $VIMRUNTIME/defaults.vim
|
||||||
|
|
||||||
|
call assert_equal(0, &compatible)
|
||||||
|
endfunc
|
@ -758,6 +758,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2115,
|
||||||
/**/
|
/**/
|
||||||
2114,
|
2114,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user