aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
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/testdir
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/testdir')
-rw-r--r--src/nvim/testdir/test_search_stat.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search_stat.vim b/src/nvim/testdir/test_search_stat.vim
index c1957497f4..11c6489ca2 100644
--- a/src/nvim/testdir/test_search_stat.vim
+++ b/src/nvim/testdir/test_search_stat.vim
@@ -186,6 +186,35 @@ func Test_search_stat()
bwipe!
endfunc
+func Test_search_stat_foldopen()
+ CheckScreendump
+
+ let lines =<< trim END
+ set shortmess-=S
+ setl foldenable foldmethod=indent foldopen-=search
+ call append(0, ['if', "\tfoo", "\tfoo", 'endif'])
+ let @/ = 'foo'
+ call cursor(1,1)
+ norm n
+ END
+ call writefile(lines, 'Xsearchstat1')
+
+ let buf = RunVimInTerminal('-S Xsearchstat1', #{rows: 10})
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_searchstat_3', {})
+
+ call term_sendkeys(buf, "n")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_searchstat_3', {})
+
+ call term_sendkeys(buf, "n")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_searchstat_3', {})
+
+ call StopVimInTerminal(buf)
+ call delete('Xsearchstat1')
+endfunc
+
func! Test_search_stat_screendump()
CheckScreendump