diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:31 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:31 +0000 |
commit | 339e2d15cc26fe86988ea06468d912a46c8d6f29 (patch) | |
tree | a6167fc8fcfc6ae2dc102f57b2473858eac34063 /test/functional/legacy/search_spec.lua | |
parent | 067dc73729267c0262438a6fdd66e586f8496946 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.gz rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.tar.bz2 rneovim-339e2d15cc26fe86988ea06468d912a46c8d6f29.zip |
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
Diffstat (limited to 'test/functional/legacy/search_spec.lua')
-rw-r--r-- | test/functional/legacy/search_spec.lua | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua index 3f1f85cf28..25620f5262 100644 --- a/test/functional/legacy/search_spec.lua +++ b/test/functional/legacy/search_spec.lua @@ -290,8 +290,8 @@ describe('search cmdline', function() -- First match feed('/thei') screen:expect([[ + 3 the | 4 {inc:thei}r | - 5 there | /thei^ | ]]) -- Match from initial cursor position when modifying search @@ -642,7 +642,7 @@ describe('search cmdline', function() end) -- oldtest: Test_incsearch_substitute_dump2() - it('detects empty pattern properly vim-patch:8.2.2295', function() + it('incsearch detects empty pattern properly vim-patch:8.2.2295', function() screen:try_resize(70, 6) exec([[ set incsearch hlsearch scrolloff=0 @@ -675,6 +675,46 @@ describe('search cmdline', function() :1,5s/\v|^ | ]]) end) + + -- oldtest: Test_incsearch_restore_view() + it('incsearch restores viewport', function() + screen:try_resize(20, 6) + exec([[ + set incsearch nohlsearch + setlocal scrolloff=0 smoothscroll + call setline(1, [join(range(25), ' '), '', '', '', '', 'xxx']) + call feedkeys("2\<C-E>", 't') + ]]) + local s = [[ + {tilde:<<<} 18 19 20 21 22 2| + ^3 24 | + | + | + | + | + ]] + screen:expect(s) + feed('/xx') + screen:expect([[ + | + | + | + | + {inc:xx}x | + /xx^ | + ]]) + feed('x') + screen:expect([[ + | + | + | + | + {inc:xxx} | + /xxx^ | + ]]) + feed('<Esc>') + screen:expect(s) + end) end) describe('Search highlight', function() |