comparison src/option.c @ 13361:65c29bd4548b v8.0.1554

patch 8.0.1554: custom plugins loaded with --clean commit https://github.com/vim/vim/commit/072687032683b1994d25a114893d9a6f8bc36612 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 1 21:57:32 2018 +0100 patch 8.0.1554: custom plugins loaded with --clean Problem: Custom plugins loaded with --clean. Solution: Do not include the home directory in 'runtimepath'.
author Christian Brabandt <cb@256bit.org>
date Thu, 01 Mar 2018 22:00:09 +0100
parents 65c3e8259124
children 69517d67421f
comparison
equal deleted inserted replaced
13360:7c7ebafc5c3c 13361:65c29bd4548b
3343 3343
3344 /* 3344 /*
3345 * Initialize the options, first part. 3345 * Initialize the options, first part.
3346 * 3346 *
3347 * Called only once from main(), just after creating the first buffer. 3347 * Called only once from main(), just after creating the first buffer.
3348 * If "clean_arg" is TRUE Vim was started with --clean.
3348 */ 3349 */
3349 void 3350 void
3350 set_init_1(void) 3351 set_init_1(int clean_arg)
3351 { 3352 {
3352 char_u *p; 3353 char_u *p;
3353 int opt_idx; 3354 int opt_idx;
3354 long_u n; 3355 long_u n;
3355 3356
3551 /* 3552 /*
3552 * Set all the options (except the terminal options) to their default 3553 * Set all the options (except the terminal options) to their default
3553 * value. Also set the global value for local options. 3554 * value. Also set the global value for local options.
3554 */ 3555 */
3555 set_options_default(0); 3556 set_options_default(0);
3557
3558 #ifdef CLEAN_RUNTIMEPATH
3559 if (clean_arg)
3560 {
3561 opt_idx = findoption((char_u *)"runtimepath");
3562 if (opt_idx >= 0)
3563 {
3564 options[opt_idx].def_val[VI_DEFAULT] = (char_u *)CLEAN_RUNTIMEPATH;
3565 p_rtp = (char_u *)CLEAN_RUNTIMEPATH;
3566 }
3567 opt_idx = findoption((char_u *)"packpath");
3568 if (opt_idx >= 0)
3569 {
3570 options[opt_idx].def_val[VI_DEFAULT] = (char_u *)CLEAN_RUNTIMEPATH;
3571 p_pp = (char_u *)CLEAN_RUNTIMEPATH;
3572 }
3573 }
3574 #endif
3556 3575
3557 #ifdef FEAT_GUI 3576 #ifdef FEAT_GUI
3558 if (found_reverse_arg) 3577 if (found_reverse_arg)
3559 set_option_value((char_u *)"bg", 0L, (char_u *)"dark", 0); 3578 set_option_value((char_u *)"bg", 0L, (char_u *)"dark", 0);
3560 #endif 3579 #endif