aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-17 21:31:51 +0800
committerGitHub <noreply@github.com>2023-09-17 21:31:51 +0800
commitf54677132b9052640ec0ecb79001a69a6d032565 (patch)
tree38754f972beb26df97c87fc6f4609614c94bca7e
parent211edceb4f4d4d0f6c41a6ee56891a6f9407e3a7 (diff)
downloadrneovim-f54677132b9052640ec0ecb79001a69a6d032565.tar.gz
rneovim-f54677132b9052640ec0ecb79001a69a6d032565.tar.bz2
rneovim-f54677132b9052640ec0ecb79001a69a6d032565.zip
test(ui/fold_spec): click on multibyte "foldclosed" (#25216)
-rw-r--r--test/functional/ui/fold_spec.lua51
1 files changed, 45 insertions, 6 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 46de6b114e..a371b45e2b 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -423,6 +423,45 @@ describe("folded lines", function()
:set norightleft |
]])
end
+
+ -- Add a winbar to avoid double-clicks
+ command('setlocal winbar=!!!!!!')
+ if multigrid then
+ meths.input_mouse('left', 'press', '', 2, 1, 1)
+ screen:expect([[
+ ## grid 1
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [3:---------------------------------------------]|
+ ## grid 2
+ {11:!!!!!! }|
+ {7:▾▾}^aa |
+ {7:││}bb |
+ {7:││}cc |
+ {7:││}dd |
+ {7:││}ee |
+ {7:│ }ff |
+ ## grid 3
+ :set norightleft |
+ ]])
+ else
+ meths.input_mouse('left', 'press', '', 0, 1, 1)
+ screen:expect([[
+ {11:!!!!!! }|
+ {7:▾▾}^aa |
+ {7:││}bb |
+ {7:││}cc |
+ {7:││}dd |
+ {7:││}ee |
+ {7:│ }ff |
+ :set norightleft |
+ ]])
+ end
end)
it("works with split", function()
@@ -2834,7 +2873,7 @@ describe("folded lines", function()
command('5,6fold')
command('2,6fold')
if multigrid then
- screen:expect{grid=[[
+ screen:expect([[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
@@ -2852,7 +2891,7 @@ describe("folded lines", function()
{1:~ }|
## grid 3
|
- ]]}
+ ]])
else
screen:expect([[
{7: }This is a |
@@ -2868,7 +2907,7 @@ describe("folded lines", function()
feed('zo')
if multigrid then
- screen:expect{grid=[[
+ screen:expect([[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
@@ -2886,7 +2925,7 @@ describe("folded lines", function()
{1:~ }|
## grid 3
|
- ]]}
+ ]])
else
screen:expect([[
{7: }This is a |
@@ -2904,7 +2943,7 @@ describe("folded lines", function()
command('hi! Visual guibg=Red')
feed('V2k')
if multigrid then
- screen:expect{grid=[[
+ screen:expect([[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
@@ -2922,7 +2961,7 @@ describe("folded lines", function()
{1:~ }|
## grid 3
{11:-- VISUAL LINE --} |
- ]]}
+ ]])
else
screen:expect([[
{7: }This is a |