Mercurial > vim
comparison src/normal.c @ 26101:5317b0ae4893 v8.2.3583
patch 8.2.3583: the "gd" and "gD" commands do not update search stats
Commit: https://github.com/vim/vim/commit/0c71114aede81a209b7efc126b4bf19f11d58955
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 12 10:30:04 2021 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Nov 2021 11:45:04 +0100 |
parents | f53f365078dd |
children | 20200363816c |
comparison
equal
deleted
inserted
replaced
26100:babd9f1dbe12 | 26101:5317b0ae4893 |
---|---|
2303 int len; | 2303 int len; |
2304 char_u *ptr; | 2304 char_u *ptr; |
2305 | 2305 |
2306 if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0 | 2306 if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0 |
2307 || find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START) | 2307 || find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START) |
2308 == FAIL) | 2308 == FAIL) |
2309 { | |
2309 clearopbeep(oap); | 2310 clearopbeep(oap); |
2311 } | |
2312 else | |
2313 { | |
2310 #ifdef FEAT_FOLDING | 2314 #ifdef FEAT_FOLDING |
2311 else if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP) | 2315 if ((fdo_flags & FDO_SEARCH) && KeyTyped && oap->op_type == OP_NOP) |
2312 foldOpenCursor(); | 2316 foldOpenCursor(); |
2313 #endif | 2317 #endif |
2318 // clear any search statistics | |
2319 if (messaging() && !msg_silent && !shortmess(SHM_SEARCHCOUNT)) | |
2320 clear_cmdline = TRUE; | |
2321 } | |
2314 } | 2322 } |
2315 | 2323 |
2316 /* | 2324 /* |
2317 * Return TRUE if line[offset] is not inside a C-style comment or string, FALSE | 2325 * Return TRUE if line[offset] is not inside a C-style comment or string, FALSE |
2318 * otherwise. | 2326 * otherwise. |