diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-12 22:18:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-12 22:18:23 +0200 |
commit | c9edd6b58218d25bfc5389af901021dc0eb82578 (patch) | |
tree | 8520f99adae557ca2c86d3299f4375f14068b50c /src/eval.c | |
parent | 66e0014ba651208ab7579797866ab0e4bd9e2b49 (diff) |
patch 8.2.1437: Vim9: 'statusline' is evaluated using Vim9 script syntaxv8.2.1437
Problem: Vim9: 'statusline' is evaluated using Vim9 script syntax.
Solution: Always use legacy script syntax.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 07b30c723a..984835b6da 100644 --- a/src/eval.c +++ b/src/eval.c @@ -520,6 +520,7 @@ eval_to_string( /* * Call eval_to_string() without using current local variables and using * textwinlock. When "use_sandbox" is TRUE use the sandbox. + * Use legacy Vim script syntax. */ char_u * eval_to_string_safe( @@ -528,7 +529,9 @@ eval_to_string_safe( { char_u *retval; funccal_entry_T funccal_entry; + int save_sc_version = current_sctx.sc_version; + current_sctx.sc_version = 1; save_funccal(&funccal_entry); if (use_sandbox) ++sandbox; @@ -538,6 +541,7 @@ eval_to_string_safe( --sandbox; --textwinlock; restore_funccal(); + current_sctx.sc_version = save_sc_version; return retval; } |