To: vim_dev@googlegroups.com Subject: Patch 8.2.1520 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1520 Problem: Vim9: CTRL-] used in :def function does not work. Solution: Omit count or prepend colon. (closes #6769) Files: src/normal.c, src/testdir/test_vim9_cmd.vim *** ../vim-8.2.1519/src/normal.c 2020-08-09 14:03:51.541367942 +0200 --- src/normal.c 2020-08-23 21:40:37.104547639 +0200 *************** *** 3644,3651 **** { if (g_cmd) STRCPY(buf, "tj "); else ! sprintf((char *)buf, "%ldta ", cap->count0); } } --- 3644,3653 ---- { if (g_cmd) STRCPY(buf, "tj "); + else if (cap->count0 == 0) + STRCPY(buf, "ta "); else ! sprintf((char *)buf, ":%ldta ", cap->count0); } } *** ../vim-8.2.1519/src/testdir/test_vim9_cmd.vim 2020-08-20 18:02:42.715595020 +0200 --- src/testdir/test_vim9_cmd.vim 2020-08-23 21:45:55.996004338 +0200 *************** *** 295,299 **** --- 295,319 ---- CheckScriptSuccess(['vim9script'] + lines) enddef + def Test_normal_command() + new + setline(1, 'doesnotexist') + let caught = 0 + try + exe "norm! \" + catch /E433/ + caught = 2 + endtry + assert_equal(2, caught) + + try + exe "norm! 3\" + catch /E433/ + caught = 3 + endtry + assert_equal(3, caught) + bwipe! + enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker *** ../vim-8.2.1519/src/version.c 2020-08-23 21:05:59.210438670 +0200 --- src/version.c 2020-08-23 21:40:26.948561533 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1520, /**/ -- A cow comes flying over the battlements, lowing aggressively. The cow lands on GALAHAD'S PAGE, squashing him completely. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///