Patch 8.2.2183
Problem: Vim9: value of 'edcompatible' and 'gdefault' are used.
Solution: Ignore these deprecated options in Vim9 script. (closes #7508)
Files: src/ex_cmds.c, src/testdir/test_vim9_cmd.vim
*** ../vim-8.2.2182/src/ex_cmds.c 2020-12-21 19:59:04.565197736 +0100
--- src/ex_cmds.c 2020-12-21 20:27:27.371252907 +0100
***************
*** 3778,3783 ****
--- 3778,3792 ----
++cmd;
else
{
+ #ifdef FEAT_EVAL
+ if (in_vim9script())
+ {
+ // ignore 'gdefault' and 'edcompatible'
+ subflags.do_all = FALSE;
+ subflags.do_ask = FALSE;
+ }
+ else
+ #endif
if (!p_ed)
{
if (p_gd) // default is global on
*** ../vim-8.2.2182/src/testdir/test_vim9_cmd.vim 2020-12-21
19:59:04.573197707 +0100
--- src/testdir/test_vim9_cmd.vim 2020-12-21 20:31:32.554347096 +0100
***************
*** 740,743 ****
--- 740,756 ----
bwipe!
enddef
+ def Test_gdefault_not_used()
+ new
+ for cmd in ['set gdefault', 'set nogdefault']
+ exe cmd
+ setline(1, 'aaa')
+ s/./b/
+ assert_equal('baa', getline(1))
+ endfor
+
+ set nogdefault
+ bwipe!
+ enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-8.2.2182/src/version.c 2020-12-21 19:59:04.573197707 +0100
--- src/version.c 2020-12-21 20:28:27.331027488 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2183,
/**/
--
Q: What's a light-year?
A: One-third less calories than a regular year.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202012211933.0BLJXRrw2332389%40masaka.moolenaar.net.