aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_search.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_search.vim')
-rw-r--r--test/old/testdir/test_search.vim27
1 files changed, 25 insertions, 2 deletions
diff --git a/test/old/testdir/test_search.vim b/test/old/testdir/test_search.vim
index 37909d0afe..4a92ae34e4 100644
--- a/test/old/testdir/test_search.vim
+++ b/test/old/testdir/test_search.vim
@@ -1996,7 +1996,7 @@ func Test_incsearch_substitute_dump2()
\ 'endfor',
\ 'call setline(5, "abc|def")',
\ '3',
- \ ], 'Xis_subst_script2')
+ \ ], 'Xis_subst_script2', 'D')
let buf = RunVimInTerminal('-S Xis_subst_script2', {'rows': 9, 'cols': 70})
call term_sendkeys(buf, ':%s/\vabc|')
@@ -2011,7 +2011,30 @@ func Test_incsearch_substitute_dump2()
call StopVimInTerminal(buf)
- call delete('Xis_subst_script2')
+endfunc
+
+func Test_incsearch_restore_view()
+ CheckOption incsearch
+ CheckScreendump
+
+ let lines =<< trim [CODE]
+ set incsearch nohlsearch
+ setlocal scrolloff=0 smoothscroll
+ call setline(1, [join(range(25), ' '), '', '', '', '', 'xxx'])
+ call feedkeys("2\<C-E>", 't')
+ [CODE]
+ call writefile(lines, 'Xincsearch_restore_view', 'D')
+ let buf = RunVimInTerminal('-S Xincsearch_restore_view', {'rows': 6, 'cols': 20})
+
+ call VerifyScreenDump(buf, 'Test_incsearch_restore_view_01', {})
+ call term_sendkeys(buf, '/xx')
+ call VerifyScreenDump(buf, 'Test_incsearch_restore_view_02', {})
+ call term_sendkeys(buf, 'x')
+ call VerifyScreenDump(buf, 'Test_incsearch_restore_view_03', {})
+ call term_sendkeys(buf, "\<Esc>")
+ call VerifyScreenDump(buf, 'Test_incsearch_restore_view_01', {})
+
+ call StopVimInTerminal(buf)
endfunc
func Test_pattern_is_uppercase_smartcase()