aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/fold_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-21 18:28:12 +0800
committerGitHub <noreply@github.com>2023-06-21 18:28:12 +0800
commitded01a819ab0e10104aa29ab67cf67e4efd75e04 (patch)
tree4a0df7155773b0264f9fb4c2478a20c09ebea633 /test/functional/ui/fold_spec.lua
parent8d4a53fe6e20652946948170f2436ec520f9bdfe (diff)
downloadrneovim-ded01a819ab0e10104aa29ab67cf67e4efd75e04.tar.gz
rneovim-ded01a819ab0e10104aa29ab67cf67e4efd75e04.tar.bz2
rneovim-ded01a819ab0e10104aa29ab67cf67e4efd75e04.zip
fix(folds): don't show search or match highlighting on fold (#24084)
Diffstat (limited to 'test/functional/ui/fold_spec.lua')
-rw-r--r--test/functional/ui/fold_spec.lua80
1 files changed, 80 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 68a7c89b32..71b9e49d2f 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -2453,6 +2453,86 @@ describe("folded lines", function()
]])
end
end)
+
+ it('do not show search or match highlight #24084', function()
+ insert([[
+ line 1
+ line 2
+ line 3
+ line 4]])
+ command('2,3fold')
+ feed('/line')
+ if multigrid then
+ screen:expect([[
+ ## grid 1
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [3:---------------------------------------------]|
+ ## grid 2
+ {2:line} 1 |
+ {5:+-- 2 lines: line 2·························}|
+ {6:line} 4 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ## grid 3
+ /line^ |
+ ]])
+ else
+ screen:expect([[
+ {2:line} 1 |
+ {5:+-- 2 lines: line 2·························}|
+ {6:line} 4 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ /line^ |
+ ]])
+ end
+ feed('<Esc>')
+ funcs.matchadd('Search', 'line')
+ if multigrid then
+ screen:expect([[
+ ## grid 1
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [3:---------------------------------------------]|
+ ## grid 2
+ {6:line} 1 |
+ {5:+-- 2 lines: line 2·························}|
+ {6:line} ^4 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ ## grid 3
+ |
+ ]])
+ else
+ screen:expect([[
+ {6:line} 1 |
+ {5:+-- 2 lines: line 2·························}|
+ {6:line} ^4 |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]])
+ end
+ end)
end
describe("with ext_multigrid", function()