aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/ui/searchhl_spec.lua25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 493493da60..eab265cbb1 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -197,7 +197,8 @@ describe('search highlighting', function()
}
end)
- it('works for multiline match', function()
+ -- oldtest: Test_hlsearch_cursearch()
+ it('works for multiline match, no duplicate highlight', function()
command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo the foo and foo', 'bar'])]])
feed('gg/foo<CR>')
screen:expect([[
@@ -281,6 +282,28 @@ describe('search highlighting', function()
{2:hij}kl |
/efg\nhij |
]])
+
+ -- check clearing CurSearch when using it for another match
+ feed('G?^abcd<CR>Y')
+ screen:expect([[
+ --- |
+ {1:abcd}efg |
+ hijkl |
+ --- |
+ {2:^abcd}efg |
+ hijkl |
+ ?^abcd |
+ ]])
+ feed('kkP')
+ screen:expect([[
+ --- |
+ {1:abcd}efg |
+ {2:^abcd}efg |
+ hijkl |
+ --- |
+ {1:abcd}efg |
+ ?^abcd |
+ ]])
end)
end)