diff src/normal.c @ 21941:f65e76638eb5 v8.2.1520

patch 8.2.1520: Vim9: CTRL-] used in :def function does not work Commit: https://github.com/vim/vim/commit/b3ea36c5bcb88b6a05a66347eedd461e9385103f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 23 21:46:32 2020 +0200 patch 8.2.1520: Vim9: CTRL-] used in :def function does not work Problem: Vim9: CTRL-] used in :def function does not work. Solution: Omit count or prepend colon. (closes https://github.com/vim/vim/issues/6769)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Aug 2020 22:00:04 +0200
parents 22583b9d4efd
children afa3080a96ae
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -3644,8 +3644,10 @@ nv_ident(cmdarg_T *cap)
 	    {
 		if (g_cmd)
 		    STRCPY(buf, "tj ");
+		else if (cap->count0 == 0)
+		    STRCPY(buf, "ta ");
 		else
-		    sprintf((char *)buf, "%ldta ", cap->count0);
+		    sprintf((char *)buf, ":%ldta ", cap->count0);
 	    }
     }