diff options
author | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:16 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2019-12-15 21:17:16 -0500 |
commit | 6566251d144d2c9c9e08e05c8c3a3fe9915a19b8 (patch) | |
tree | 980fd0c7287e295c8ac72858b0794f72224415e0 /src/nvim/main.c | |
parent | 9c4223215f71e1212462ada4e698be1b31437dd9 (diff) | |
parent | 9f3d483c79f03c48239fdc82cc02e8685a03d22a (diff) | |
download | rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.gz rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.tar.bz2 rneovim-6566251d144d2c9c9e08e05c8c3a3fe9915a19b8.zip |
Merge remote-tracking branch 'upstream/master' into libcall
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index be1f08bb46..c7011f4f4e 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -27,6 +27,7 @@ #include "nvim/highlight.h" #include "nvim/iconv.h" #include "nvim/if_cscope.h" +#include "nvim/lua/executor.h" #ifdef HAVE_LOCALE_H # include <locale.h> #endif @@ -143,7 +144,6 @@ static const char *err_extra_cmd = void event_init(void) { - log_init(); loop_init(&main_loop, NULL); resize_events = multiqueue_new_child(main_loop.events); @@ -219,6 +219,7 @@ void early_init(void) // First find out the home directory, needed to expand "~" in options. init_homedir(); // find real value of $HOME set_init_1(); + log_init(); TIME_MSG("inits 1"); set_lang_var(); // set v:lang and v:ctype @@ -957,6 +958,7 @@ static void command_line_scan(mparm_T *parmp) case 'r': // "-r" recovery mode case 'L': { // "-L" recovery mode recoverymode = 1; + headless_mode = true; break; } case 's': { @@ -1460,12 +1462,13 @@ static void create_windows(mparm_T *parmp) } else parmp->window_count = 1; - if (recoverymode) { /* do recover */ - msg_scroll = TRUE; /* scroll message up */ - ml_recover(); - if (curbuf->b_ml.ml_mfp == NULL) /* failed */ + if (recoverymode) { // do recover + msg_scroll = true; // scroll message up + ml_recover(true); + if (curbuf->b_ml.ml_mfp == NULL) { // failed getout(1); - do_modelines(0); /* do modelines */ + } + do_modelines(0); // do modelines } else { // Open a buffer for windows that don't have one yet. // Commands in the vimrc might have loaded a file or split the window. @@ -1513,7 +1516,7 @@ static void create_windows(mparm_T *parmp) /* We can't close the window, it would disturb what * happens next. Clear the file name and set the arg * index to -1 to delete it later. */ - setfname(curbuf, NULL, NULL, FALSE); + setfname(curbuf, NULL, NULL, false); curwin->w_arg_idx = -1; swap_exists_action = SEA_NONE; } else @@ -1778,7 +1781,8 @@ static bool do_user_initialization(void) if (do_source(user_vimrc, true, DOSO_VIMRC) != FAIL) { do_exrc = p_exrc; if (do_exrc) { - do_exrc = (path_full_compare((char_u *)VIMRC_FILE, user_vimrc, false) + do_exrc = (path_full_compare((char_u *)VIMRC_FILE, user_vimrc, + false, true) != kEqualFiles); } xfree(user_vimrc); @@ -1805,7 +1809,7 @@ static bool do_user_initialization(void) do_exrc = p_exrc; if (do_exrc) { do_exrc = (path_full_compare((char_u *)VIMRC_FILE, (char_u *)vimrc, - false) != kEqualFiles); + false, true) != kEqualFiles); } xfree(vimrc); xfree(config_dirs); |