commit b7782daacebf8842bece6e41a20ee9a4859721e6
parent 666911be917d60ba3a19a4b56bbf1e8c16da5297
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue, 21 May 2024 07:45:59 +0800
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 <Bram@vim.org>
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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);
}
}
}