File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ eval_to_string(
520520/*
521521 * Call eval_to_string() without using current local variables and using
522522 * textwinlock. When "use_sandbox" is TRUE use the sandbox.
523+ * Use legacy Vim script syntax.
523524 */
524525 char_u *
525526eval_to_string_safe (
@@ -528,7 +529,9 @@ eval_to_string_safe(
528529{
529530 char_u * retval ;
530531 funccal_entry_T funccal_entry ;
532+ int save_sc_version = current_sctx .sc_version ;
531533
534+ current_sctx .sc_version = 1 ;
532535 save_funccal (& funccal_entry );
533536 if (use_sandbox )
534537 ++ sandbox ;
@@ -538,6 +541,7 @@ eval_to_string_safe(
538541 -- sandbox ;
539542 -- textwinlock ;
540543 restore_funccal ();
544+ current_sctx .sc_version = save_sc_version ;
541545 return retval ;
542546}
543547
Original file line number Diff line number Diff line change @@ -1086,6 +1086,20 @@ def Test_cexpr_vimscript()
10861086 set errorformat &
10871087enddef
10881088
1089+ def Test_statusline_syntax ()
1090+ # legacy syntax is used for ' statusline'
1091+ let lines = << trim END
1092+ vim9script
1093+ func g: Status ()
1094+ return ' %{"x" is# "x"}'
1095+ endfunc
1096+ set laststatus = 2 statusline = % ! Status ()
1097+ redrawstatus
1098+ set laststatus statusline =
1099+ END
1100+ CheckScriptSuccess (lines )
1101+ enddef
1102+
10891103def Test_list_vimscript ()
10901104 # checks line continuation and comments
10911105 let lines = << trim END
Original file line number Diff line number Diff line change @@ -754,6 +754,8 @@ static char *(features[]) =
754754
755755static int included_patches [] =
756756{ /* Add new patch number below this line */
757+ /**/
758+ 1437 ,
757759/**/
758760 1436 ,
759761/**/
You can’t perform that action at this time.
0 commit comments