Patch 8.2.4357 (after 8.2.4348)
Problem: sticky command modifiers are too sticky.
Solution: Do not apply command modifiers to a sourced script. (closes #9751)
Files: src/scriptfile.c, src/testdir/test_vim9_cmd.vim
*** ../vim-8.2.4356/src/scriptfile.c 2022-02-09 14:31:02.380030992 +0000
--- src/scriptfile.c 2022-02-12 12:45:51.852736231 +0000
***************
*** 1254,1259 ****
--- 1254,1260 ----
#ifdef FEAT_PROFILE
proftime_T wait_start;
#endif
+ int save_sticky_cmdmod_flags =
sticky_cmdmod_flags;
int trigger_source_post = FALSE;
ESTACK_CHECK_DECLARATION
***************
*** 1394,1399 ****
--- 1395,1403 ----
time_push(&tv_rel, &tv_start);
#endif
+ // "legacy" does not apply to commands in the script
+ sticky_cmdmod_flags = 0;
+
save_current_sctx = current_sctx;
current_sctx.sc_version = 1; // default script version
***************
*** 1618,1623 ****
--- 1622,1628 ----
theend:
vim_free(fname_exp);
+ sticky_cmdmod_flags = save_sticky_cmdmod_flags;
#ifdef FEAT_EVAL
estack_compiling = save_estack_compiling;
#endif
*** ../vim-8.2.4356/src/testdir/test_vim9_cmd.vim 2022-02-11
20:33:11.946342185 +0000
--- src/testdir/test_vim9_cmd.vim 2022-02-12 12:45:21.260772784 +0000
***************
*** 106,111 ****
--- 106,123 ----
unlet b:undo
unlet g:undone
unlet g:undtwo
+
+ # "legacy" does not apply to a loaded script
+ lines =<< trim END
+ vim9script
+ export var exported = 'x'
+ END
+ writefile(lines, 'Xvim9import.vim')
+ lines =<< trim END
+ legacy exe "import './Xvim9import.vim'"
+ END
+ v9.CheckScriptSuccess(lines)
+ delete('Xvim9import.vim')
enddef
def Test_edit_wildcards()
*** ../vim-8.2.4356/src/version.c 2022-02-12 12:03:03.959691691 +0000
--- src/version.c 2022-02-12 12:38:38.337248960 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4357,
/**/
--
If you put seven of the most talented OSS developers in a room
and ask them to fix a bug in a spreadsheet program, in one week
you'd have 2 new mail readers and a text-based web browser.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220212133051.D56981C0D2C%40moolenaar.net.