comparison src/testdir/test_search.vim @ 23505:bb29b09902d5 v8.2.2295

patch 8.2.2295: incsearch does not detect empty pattern properly Commit: https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 4 12:42:13 2021 +0100 patch 8.2.2295: incsearch does not detect empty pattern properly Problem: Incsearch does not detect empty pattern properly. Solution: Return magic state when skipping over a pattern. (Christian Brabandt, closes #7612, closes #6420)
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jan 2021 12:45:05 +0100
parents 7cb072acc5c0
children bb2e921d2601
comparison
equal deleted inserted replaced
23504:25d5c354a83e 23505:bb29b09902d5
1806 call delete('Xincsearch_nl') 1806 call delete('Xincsearch_nl')
1807 call test_override("char_avail", 0) 1807 call test_override("char_avail", 0)
1808 bw 1808 bw
1809 endfunc 1809 endfunc
1810 1810
1811 func Test_incsearch_substitute_dump2()
1812 CheckOption incsearch
1813 CheckScreendump
1814
1815 call writefile([
1816 \ 'set incsearch hlsearch scrolloff=0',
1817 \ 'for n in range(1, 4)',
1818 \ ' call setline(n, "foo " . n)',
1819 \ 'endfor',
1820 \ 'call setline(5, "abc|def")',
1821 \ '3',
1822 \ ], 'Xis_subst_script2')
1823 let buf = RunVimInTerminal('-S Xis_subst_script2', {'rows': 9, 'cols': 70})
1824
1825 call term_sendkeys(buf, ':%s/\vabc|')
1826 sleep 100m
1827 call VerifyScreenDump(buf, 'Test_incsearch_sub_01', {})
1828 call term_sendkeys(buf, "\<Esc>")
1829
1830 " The following should not be highlighted
1831 call term_sendkeys(buf, ':1,5s/\v|')
1832 sleep 100m
1833 call VerifyScreenDump(buf, 'Test_incsearch_sub_02', {})
1834
1835
1836 call StopVimInTerminal(buf)
1837 call delete('Xis_subst_script2')
1838 endfunc
1839
1811 " vim: shiftwidth=2 sts=2 expandtab 1840 " vim: shiftwidth=2 sts=2 expandtab