mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2905: no error when defaults.vim cannot be loaded
Problem: No error when defaults.vim cannot be loaded. Solution: Add an error message. (Christian Brabandt, closes #8248)
This commit is contained in:
committed by
Bram Moolenaar
parent
74ede80aeb
commit
1d3a14ecf0
10
src/main.c
10
src/main.c
@@ -3128,7 +3128,11 @@ source_startup_scripts(mparm_T *parmp)
|
||||
if (parmp->use_vimrc != NULL)
|
||||
{
|
||||
if (STRCMP(parmp->use_vimrc, "DEFAULTS") == 0)
|
||||
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, NULL);
|
||||
{
|
||||
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, NULL)
|
||||
!= OK)
|
||||
emsg(e_failed_to_source_defaults);
|
||||
}
|
||||
else if (STRCMP(parmp->use_vimrc, "NONE") == 0
|
||||
|| STRCMP(parmp->use_vimrc, "NORC") == 0)
|
||||
{
|
||||
@@ -3200,7 +3204,9 @@ source_startup_scripts(mparm_T *parmp)
|
||||
&& !has_dash_c_arg)
|
||||
{
|
||||
// When no .vimrc file was found: source defaults.vim.
|
||||
do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, NULL);
|
||||
if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE,
|
||||
NULL) == FAIL)
|
||||
emsg(e_failed_to_source_defaults);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user