To: vim_dev@googlegroups.com Subject: Patch 8.2.2303 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2303 Problem: Vim9: backtick expansion doesn't work for :foldopen. Solution: Do recognize backtick expansion. (closes #7621) Files: src/vim9compile.c, src/testdir/test_vim9_cmd.vim *** ../vim-8.2.2302/src/vim9compile.c 2021-01-04 21:57:08.088222062 +0100 --- src/vim9compile.c 2021-01-05 19:22:11.780861802 +0100 *************** *** 7505,7510 **** --- 7505,7517 ---- } } + if (eap->cmdidx == CMD_folddoopen || eap->cmdidx == CMD_folddoclosed) + { + // TODO: should only expand when appropriate for the command + eap->arg = skiptowhite(eap->arg); + has_expr = TRUE; + } + if (has_expr && (p = (char_u *)strstr((char *)eap->arg, "`=")) != NULL) { int count = 0; *** ../vim-8.2.2302/src/testdir/test_vim9_cmd.vim 2021-01-04 16:15:55.066084896 +0100 --- src/testdir/test_vim9_cmd.vim 2021-01-05 19:21:08.637050506 +0100 *************** *** 81,86 **** --- 81,103 ---- bwipe! enddef + def Test_folddo_backtick_expansion() + new + var name = 'xxx' + folddoopen edit `=name` + assert_equal('xxx', bufname()) + bwipe! + + new + setline(1, ['one', 'two']) + set nomodified + :1,2fold + foldclose + folddoclose edit `=name` + assert_equal('xxx', bufname()) + bwipe! + enddef + def Test_hardcopy_wildcards() CheckUnix CheckFeature postscript *** ../vim-8.2.2302/src/version.c 2021-01-05 17:50:24.741302345 +0100 --- src/version.c 2021-01-05 19:16:22.661898009 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2303, /**/ -- From "know your smileys": :-| :-| Deja' vu! /// 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 ///