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.
diff --git a/src/normal.c b/src/normal.c
index ba3b53b..11b61f9 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -2305,12 +2305,20 @@
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;
+ }
}
/*