From b7782daacebf8842bece6e41a20ee9a4859721e6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 21 May 2024 07:45:59 +0800 Subject: vim-patch:8.2.1520: Vim9: CTRL-] used in :def function does not work (#28880) Problem: Vim9: CTRL-] used in :def function does not work. Solution: Omit count or prepend colon. (closes vim/vim#6769) https://github.com/vim/vim/commit/b3ea36c5bcb88b6a05a66347eedd461e9385103f Co-authored-by: Bram Moolenaar --- src/nvim/normal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 02bd3d05c1..9646b83106 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3451,8 +3451,10 @@ static void nv_ident(cmdarg_T *cap) } else { if (g_cmd) { STRCPY(buf, "tj "); + } else if (cap->count0 == 0) { + STRCPY(buf, "ta "); } else { - snprintf(buf, buf_size, "%" PRId64 "ta ", (int64_t)cap->count0); + snprintf(buf, buf_size, ":%" PRId64 "ta ", (int64_t)cap->count0); } } } -- cgit