Patch 8.2.1520

4 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 23, 2020, 3:47:15 PM8/23/20
to vim...@googlegroups.com

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! \<C-]>"
+ catch /E433/
+ caught = 2
+ endtry
+ assert_equal(2, caught)
+
+ try
+ exe "norm! 3\<C-]>"
+ 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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages