diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-29 23:04:25 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-29 23:04:25 +0100 |
commit | 1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506 (patch) | |
tree | 8f5dc27f3eeea927ad3ca8de42fe0df06a041dd5 /src/highlight.c | |
parent | 257a396879ff67a0482841a39237f30a8e1e27c5 (diff) | |
download | vim-git-1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506.tar.gz |
patch 8.2.0056: execution stack is incomplete and inefficientv8.2.0056
Problem: Execution stack is incomplete and inefficient.
Solution: Introduce a proper execution stack and use it instead of
sourcing_name/sourcing_lnum. Create a string only when used.
Diffstat (limited to 'src/highlight.c')
-rw-r--r-- | src/highlight.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/highlight.c b/src/highlight.c index 40dda6452..19aafffe5 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -748,7 +748,7 @@ do_highlight( if (to_id > 0 && !forceit && !init && hl_has_settings(from_id - 1, dodefault)) { - if (sourcing_name == NULL && !dodefault) + if (SOURCING_NAME == NULL && !dodefault) emsg(_("E414: group has settings, highlight link ignored")); } else if (HL_TABLE()[from_id - 1].sg_link != to_id @@ -763,7 +763,7 @@ do_highlight( HL_TABLE()[from_id - 1].sg_link = to_id; #ifdef FEAT_EVAL HL_TABLE()[from_id - 1].sg_script_ctx = current_sctx; - HL_TABLE()[from_id - 1].sg_script_ctx.sc_lnum += sourcing_lnum; + HL_TABLE()[from_id - 1].sg_script_ctx.sc_lnum += SOURCING_LNUM; #endif HL_TABLE()[from_id - 1].sg_cleared = FALSE; redraw_all_later(SOME_VALID); @@ -1518,7 +1518,7 @@ do_highlight( set_hl_attr(idx); #ifdef FEAT_EVAL HL_TABLE()[idx].sg_script_ctx = current_sctx; - HL_TABLE()[idx].sg_script_ctx.sc_lnum += sourcing_lnum; + HL_TABLE()[idx].sg_script_ctx.sc_lnum += SOURCING_LNUM; #endif } |