Mercurial > vim
comparison src/testdir/test_search_stat.vim @ 20573:00fff78a929a v8.2.0840
patch 8.2.0840: search match count wrong when only match is in fold
Commit: https://github.com/vim/vim/commit/6cb0726215519fe94103803e4aa77a355384bcf2
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 29 22:49:43 2020 +0200
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 #6160, closes #6152)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 29 May 2020 23:00:04 +0200 |
parents | c087099e9163 |
children | 8a2b86a39ef4 |
comparison
equal
deleted
inserted
replaced
20572:8dd549c6de33 | 20573:00fff78a929a |
---|---|
182 | 182 |
183 " Clean up | 183 " Clean up |
184 set shortmess+=S | 184 set shortmess+=S |
185 " close the window | 185 " close the window |
186 bwipe! | 186 bwipe! |
187 endfunc | |
188 | |
189 func Test_search_stat_foldopen() | |
190 CheckScreendump | |
191 | |
192 let lines =<< trim END | |
193 set shortmess-=S | |
194 setl foldenable foldmethod=indent foldopen-=search | |
195 call append(0, ['if', "\tfoo", "\tfoo", 'endif']) | |
196 let @/ = 'foo' | |
197 call cursor(1,1) | |
198 norm n | |
199 END | |
200 call writefile(lines, 'Xsearchstat1') | |
201 | |
202 let buf = RunVimInTerminal('-S Xsearchstat1', #{rows: 10}) | |
203 call TermWait(buf) | |
204 call VerifyScreenDump(buf, 'Test_searchstat_3', {}) | |
205 | |
206 call term_sendkeys(buf, "n") | |
207 call TermWait(buf) | |
208 call VerifyScreenDump(buf, 'Test_searchstat_3', {}) | |
209 | |
210 call term_sendkeys(buf, "n") | |
211 call TermWait(buf) | |
212 call VerifyScreenDump(buf, 'Test_searchstat_3', {}) | |
213 | |
214 call StopVimInTerminal(buf) | |
215 call delete('Xsearchstat1') | |
187 endfunc | 216 endfunc |
188 | 217 |
189 func! Test_search_stat_screendump() | 218 func! Test_search_stat_screendump() |
190 CheckScreendump | 219 CheckScreendump |
191 | 220 |