diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 18:47:20 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-04 18:47:20 +0800 |
commit | ab7ae8806e907c7238e5379f6d0eeb4d62277759 (patch) | |
tree | 6d29fb8dc6f5b7252dbc2ba02ec9873f182a177c /src/nvim/normal.c | |
parent | b9def4ae10dc77d16786d99e2814033c02178e63 (diff) | |
download | rneovim-ab7ae8806e907c7238e5379f6d0eeb4d62277759.tar.gz rneovim-ab7ae8806e907c7238e5379f6d0eeb4d62277759.tar.bz2 rneovim-ab7ae8806e907c7238e5379f6d0eeb4d62277759.zip |
vim-patch:8.2.3583: the "gd" and "gD" commands do not update search stats
Problem: The "gd" and "gD" commands do not update search stats. (Gary
Johnson)
Solution: Clear search stats.
https://github.com/vim/vim/commit/0c71114aede81a209b7efc126b4bf19f11d58955
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 96f321cf9b..225c66aae1 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3098,8 +3098,14 @@ static void nv_gd(oparg_T *oap, int nchar, int thisblock) if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0 || !find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START)) { clearopbeep(oap); - } else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP) { - foldOpenCursor(); + } else { + if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP) { + foldOpenCursor(); + } + // clear any search statistics + if (messaging() && !msg_silent && !shortmess(SHM_SEARCHCOUNT)) { + clear_cmdline = true; + } } } |