diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-05-21 07:45:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 07:45:59 +0800 |
commit | b7782daacebf8842bece6e41a20ee9a4859721e6 (patch) | |
tree | adbdf14d4eae493decdc4f611d76046c334eaaab | |
parent | 666911be917d60ba3a19a4b56bbf1e8c16da5297 (diff) | |
download | rneovim-b7782daacebf8842bece6e41a20ee9a4859721e6.tar.gz rneovim-b7782daacebf8842bece6e41a20ee9a4859721e6.tar.bz2 rneovim-b7782daacebf8842bece6e41a20ee9a4859721e6.zip |
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>
-rw-r--r-- | src/nvim/normal.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } } } |