Skip to content

Commit 2e4cb3b

Browse files
committed
patch 8.0.1213: setting 'mzschemedll' has no effect
Problem: Setting 'mzschemedll' has no effect. Solution: Move loading .vimrc to before call to mzscheme_main().
1 parent 66857f4 commit 2e4cb3b

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/main.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,26 @@ main
403403
debug_break_level = params.use_debug_break_level;
404404
#endif
405405

406+
/* Reset 'loadplugins' for "-u NONE" before "--cmd" arguments.
407+
* Allows for setting 'loadplugins' there. */
408+
if (params.use_vimrc != NULL
409+
&& (STRCMP(params.use_vimrc, "NONE") == 0
410+
|| STRCMP(params.use_vimrc, "DEFAULTS") == 0))
411+
p_lpl = FALSE;
412+
413+
/* Execute --cmd arguments. */
414+
exe_pre_commands(&params);
415+
416+
/* Source startup scripts. */
417+
source_startup_scripts(&params);
418+
406419
#ifdef FEAT_MZSCHEME
407420
/*
408421
* Newer version of MzScheme (Racket) require earlier (trampolined)
409422
* initialisation via scheme_main_setup.
410423
* Implement this by initialising it as early as possible
411424
* and splitting off remaining Vim main into vim_main2().
425+
* Do source startup scripts, so that 'mzschemedll' can be set.
412426
*/
413427
return mzscheme_main();
414428
#else
@@ -427,19 +441,6 @@ main
427441
vim_main2(void)
428442
{
429443
#ifndef NO_VIM_MAIN
430-
/* Reset 'loadplugins' for "-u NONE" before "--cmd" arguments.
431-
* Allows for setting 'loadplugins' there. */
432-
if (params.use_vimrc != NULL
433-
&& (STRCMP(params.use_vimrc, "NONE") == 0
434-
|| STRCMP(params.use_vimrc, "DEFAULTS") == 0))
435-
p_lpl = FALSE;
436-
437-
/* Execute --cmd arguments. */
438-
exe_pre_commands(&params);
439-
440-
/* Source startup scripts. */
441-
source_startup_scripts(&params);
442-
443444
#ifdef FEAT_EVAL
444445
/*
445446
* Read all the plugin files.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1213,
764766
/**/
765767
1212,
766768
/**/

0 commit comments

Comments
 (0)