aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-23 06:55:24 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-23 19:24:47 +0800
commit8db55aedb52883f4b024ddd05524e18bc93d5c0b (patch)
tree16321677901f5e15cd9c8b89566dbfbacfc7055b /test/functional
parent4e4914ab2e523f100c06fc5fb253f8625cc67232 (diff)
downloadrneovim-8db55aedb52883f4b024ddd05524e18bc93d5c0b.tar.gz
rneovim-8db55aedb52883f4b024ddd05524e18bc93d5c0b.tar.bz2
rneovim-8db55aedb52883f4b024ddd05524e18bc93d5c0b.zip
vim-patch:8.2.4805: CurSearch used for all matches in current line
Problem: CurSearch used for all matches in current line. Solution: Don't use the non-zero line count. (closes vim/vim#10247) https://github.com/vim/vim/commit/9b36750640e8e89f18afa1446ed80fdbdf0fcac0
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/searchhl_spec.lua27
1 files changed, 24 insertions, 3 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 84dc3c59bb..56ff8a4101 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -163,15 +163,25 @@ describe('search highlighting', function()
end)
it('works for multiline match', function()
- command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo', 'bar'])]])
+ command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo the foo and foo', 'bar'])]])
feed('gg/foo<CR>')
screen:expect([[
one |
{2:^foo} |
bar |
baz |
+ {1:foo} the {1:foo} and {1:foo} |
+ bar |
+ /foo |
+ ]])
+ feed('n')
+ screen:expect([[
+ one |
{1:foo} |
bar |
+ baz |
+ {2:^foo} the {1:foo} and {1:foo} |
+ bar |
/foo |
]])
feed('n')
@@ -180,11 +190,22 @@ describe('search highlighting', function()
{1:foo} |
bar |
baz |
- {2:^foo} |
+ {1:foo} the {2:^foo} and {1:foo} |
+ bar |
+ /foo |
+ ]])
+ feed('n')
+ screen:expect([[
+ one |
+ {1:foo} |
+ bar |
+ baz |
+ {1:foo} the {1:foo} and {2:^foo} |
bar |
/foo |
]])
- feed('?<CR>')
+ command([[call setline(5, 'foo')]])
+ feed('0?<CR>')
screen:expect([[
one |
{2:^foo} |