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 -- [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/202008231947.07NJl7a11058817%40masaka.moolenaar.net.

Raspunde prin e-mail lui