mirror of
https://github.com/neovim/neovim.git
synced 2026-04-27 01:34:16 +00:00
fix(folds): don't show search or match highlighting on fold (#24084)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user