aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-11 21:29:25 +0800
committerGitHub <noreply@github.com>2023-03-11 21:29:25 +0800
commit7dc9182cf0b27cbfb4e289db55dd7b02998ef5c8 (patch)
tree3eca706a2115138bbbb76ce562ba441c13bf659d /src/nvim/syntax.c
parent6d0c61d90d316473eee0729363e20bf06825b09b (diff)
downloadrneovim-7dc9182cf0b27cbfb4e289db55dd7b02998ef5c8.tar.gz
rneovim-7dc9182cf0b27cbfb4e289db55dd7b02998ef5c8.tar.bz2
rneovim-7dc9182cf0b27cbfb4e289db55dd7b02998ef5c8.zip
vim-patch:8.2.1398: autoload script sourced twice if sourced directly (#22622)
Problem: Autoload script sourced twice if sourced directly. Solution: Do not source an autoload script again. (issue vim/vim#6644) https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048 Cherry-pick ret_sid changes from patch 8.2.0149. Use do_in_runtimepath() as that's what source_runtime() calls in Nvim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index d4161b9ca2..14fef19399 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -4026,7 +4026,7 @@ static void syn_cmd_include(exarg_T *eap, int syncing)
prev_toplvl_grp = curwin->w_s->b_syn_topgrp;
curwin->w_s->b_syn_topgrp = sgl_id;
if (source
- ? do_source(eap->arg, false, DOSO_NONE) == FAIL
+ ? do_source(eap->arg, false, DOSO_NONE, NULL) == FAIL
: source_runtime(eap->arg, DIP_ALL) == FAIL) {
semsg(_(e_notopen), eap->arg);
}