aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-29 19:53:00 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-29 21:36:00 -0400
commit0d100032b885f2eedee96fb7ad6dd660943fc5e3 (patch)
tree3bb5b0a02b572f7c929b4b57c63481329bf1c762 /src/nvim/search.c
parent83ebe0c9988bd4abeda0f7ca0775d50e050b9e55 (diff)
downloadrneovim-0d100032b885f2eedee96fb7ad6dd660943fc5e3.tar.gz
rneovim-0d100032b885f2eedee96fb7ad6dd660943fc5e3.tar.bz2
rneovim-0d100032b885f2eedee96fb7ad6dd660943fc5e3.zip
vim-patch:8.2.0840: search match count wrong when only match is in fold
Problem: Search match count wrong when only match is in fold. Solution: Update search stats when in a closed fold. (Christian Brabandt, closes vim/vim#6160, closes vim/vim#6152) https://github.com/vim/vim/commit/6cb0726215519fe94103803e4aa77a355384bcf2
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index a3acf0c27d..b053459c7f 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -1370,7 +1370,10 @@ int do_search(
&& !shortmess(SHM_SEARCHCOUNT)
&& msgbuf != NULL) {
search_stat(dirc, &pos, show_top_bot_msg, msgbuf,
- (count != 1 || has_offset));
+ (count != 1
+ || has_offset
+ || (!(fdo_flags & FDO_SEARCH)
+ && hasFolding(curwin->w_cursor.lnum, NULL, NULL))));
}
// The search command can be followed by a ';' to do another search.