0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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.
This commit is contained in:
Bram Moolenaar
2021-11-12 10:30:04 +00:00
parent 113cb513f7
commit 0c71114aed
5 changed files with 58 additions and 3 deletions

View File

@@ -2305,12 +2305,20 @@ nv_gd(
if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0
|| find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START)
== FAIL)
== FAIL)
{
clearopbeep(oap);
}
else
{
#ifdef FEAT_FOLDING
else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP)
foldOpenCursor();
if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP)
foldOpenCursor();
#endif
// clear any search statistics
if (messaging() && !msg_silent && !shortmess(SHM_SEARCHCOUNT))
clear_cmdline = TRUE;
}
}
/*