To: vim_dev@googlegroups.com Subject: Patch 8.2.2183 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- 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 ///