aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/searchhl_spec.lua
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2020-12-29 01:19:24 +0100
committerGitHub <noreply@github.com>2020-12-29 01:19:24 +0100
commitb0215afc84102073554bb7cf990b881b33878ac1 (patch)
treebe606cf2a0f108bc1bac2dbd3c9133d6ede7486c /test/functional/ui/searchhl_spec.lua
parent93762072d13477f1847ddd918840323e4e1322dc (diff)
downloadrneovim-b0215afc84102073554bb7cf990b881b33878ac1.tar.gz
rneovim-b0215afc84102073554bb7cf990b881b33878ac1.tar.bz2
rneovim-b0215afc84102073554bb7cf990b881b33878ac1.zip
fix(fold): dont highlight search results on folded lines (#13616)
Behavior may change in future but for now stick to legacy behavior.
Diffstat (limited to 'test/functional/ui/searchhl_spec.lua')
-rw-r--r--test/functional/ui/searchhl_spec.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 885fe7d4c9..3bb72303bf 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -21,6 +21,7 @@ describe('search highlighting', function()
[3] = {reverse = true},
[4] = {foreground = colors.Red}, -- Message
[5] = {bold = true, reverse = true},
+ [6] = {foreground = Screen.colors.Blue4, background = Screen.colors.LightGrey}, -- Folded
})
end)
@@ -39,6 +40,21 @@ describe('search highlighting', function()
]])
end)
+ it('is disabled in folded text', function()
+ insert("some text\nmore text")
+ feed_command('1,2fold')
+ feed("gg/text")
+ screen:expect([[
+ {6:+-- 2 lines: some text·················}|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ /text^ |
+ ]])
+ end)
+
it('works', function()
insert([[
some text