mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
option,main: Partial support of XDG base directory specification
- Add functions that are able to query XDG. - Replace defaults for - &runtimepath. Does not follow #78. - &viewdir. - &undodir. - &directory. - &backupdir. Does not follow #78. - vimrc location. - Remove user vimrc file line from :version message.
This commit is contained in:
@@ -1840,16 +1840,9 @@ static void source_startup_scripts(mparm_T *parmp)
|
||||
* - second user exrc file ($VIM/.exrc for Dos)
|
||||
* The first that exists is used, the rest is ignored.
|
||||
*/
|
||||
char_u *user_vimrc = (char_u *)get_from_user_conf("init.vim");
|
||||
if (process_env("VIMINIT", true) != OK) {
|
||||
if (do_source((char_u *)USR_VIMRC_FILE, TRUE, DOSO_VIMRC) == FAIL
|
||||
#ifdef USR_VIMRC_FILE2
|
||||
&& do_source((char_u *)USR_VIMRC_FILE2, TRUE,
|
||||
DOSO_VIMRC) == FAIL
|
||||
#endif
|
||||
#ifdef USR_VIMRC_FILE3
|
||||
&& do_source((char_u *)USR_VIMRC_FILE3, TRUE,
|
||||
DOSO_VIMRC) == FAIL
|
||||
#endif
|
||||
if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL
|
||||
&& process_env("EXINIT", FALSE) == FAIL
|
||||
&& do_source((char_u *)USR_EXRC_FILE, FALSE, DOSO_NONE) == FAIL) {
|
||||
#ifdef USR_EXRC_FILE2
|
||||
@@ -1875,16 +1868,8 @@ static void source_startup_scripts(mparm_T *parmp)
|
||||
secure = p_secure;
|
||||
|
||||
i = FAIL;
|
||||
if (path_full_compare((char_u *)USR_VIMRC_FILE,
|
||||
(char_u *)VIMRC_FILE, FALSE) != kEqualFiles
|
||||
#ifdef USR_VIMRC_FILE2
|
||||
&& path_full_compare((char_u *)USR_VIMRC_FILE2,
|
||||
(char_u *)VIMRC_FILE, FALSE) != kEqualFiles
|
||||
#endif
|
||||
#ifdef USR_VIMRC_FILE3
|
||||
&& path_full_compare((char_u *)USR_VIMRC_FILE3,
|
||||
(char_u *)VIMRC_FILE, FALSE) != kEqualFiles
|
||||
#endif
|
||||
if (path_full_compare(user_vimrc,
|
||||
(char_u *)VIMRC_FILE, false) != kEqualFiles
|
||||
#ifdef SYS_VIMRC_FILE
|
||||
&& path_full_compare((char_u *)SYS_VIMRC_FILE,
|
||||
(char_u *)VIMRC_FILE, FALSE) != kEqualFiles
|
||||
|
Reference in New Issue
Block a user