diff options
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index 0416acc705..15420450e1 100644 --- a/src/term.c +++ b/src/term.c @@ -6591,6 +6591,8 @@ term_get_bg_color(char_u *r, char_u *g, char_u *b) replace_termcodes( char_u *from, char_u **bufp, + scid_T sid_arg UNUSED, // script ID to use for <SID>, + // or 0 to use current_sctx int flags, int *did_simplify) { @@ -6660,12 +6662,12 @@ replace_termcodes( */ if (STRNICMP(src, "<SID>", 5) == 0) { - if (current_sctx.sc_sid <= 0) + if (sid_arg < 0 || (sid_arg == 0 && current_sctx.sc_sid <= 0)) emsg(_(e_using_sid_not_in_script_context)); else { char_u *dot; - long sid = current_sctx.sc_sid; + long sid = sid_arg != 0 ? sid_arg : current_sctx.sc_sid; src += 5; if (in_vim9script() |