diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-12 06:32:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 06:32:13 +0800 |
commit | 8f9c5ee5ef298883e6de1a3a9c73b348b6398404 (patch) | |
tree | fab638418dada857395c81e24b4dff4413b0f30b /test/functional | |
parent | 713311be62db5c5453bcd0a7f1dbed8d1d1add15 (diff) | |
download | rneovim-8f9c5ee5ef298883e6de1a3a9c73b348b6398404.tar.gz rneovim-8f9c5ee5ef298883e6de1a3a9c73b348b6398404.tar.bz2 rneovim-8f9c5ee5ef298883e6de1a3a9c73b348b6398404.zip |
vim-patch:9.0.1691: wrong viewport restored for incsearch and smoothscroll (#24667)
Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well
closes: vim/vim#12713
https://github.com/vim/vim/commit/7b7b4cb6f274e7bace127107b0d2752133c4020b
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/legacy/search_spec.lua | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua index 4228940eda..e2544a8405 100644 --- a/test/functional/legacy/search_spec.lua +++ b/test/functional/legacy/search_spec.lua @@ -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,37 @@ 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('/xxx') + screen:expect([[ + | + | + | + | + {inc:xxx} | + /xxx^ | + ]]) + feed('<Esc>') + screen:expect(s) + end) end) describe('Search highlight', function() |