aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/float_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-07-09 15:42:02 +0200
committerGitHub <noreply@github.com>2019-07-09 15:42:02 +0200
commit0da7b67ef90867ce4359ffbefeb27b010ea43e8e (patch)
treedd9f1fecc0ebba7697db23318c5e5ecaf53a7230 /test/functional/ui/float_spec.lua
parent06af88cd72eaf429190678dcd6d500122e35f349 (diff)
parent4af1ada9ef73b9e5bd9a0ed5921ed9056adb4236 (diff)
downloadrneovim-0da7b67ef90867ce4359ffbefeb27b010ea43e8e.tar.gz
rneovim-0da7b67ef90867ce4359ffbefeb27b010ea43e8e.tar.bz2
rneovim-0da7b67ef90867ce4359ffbefeb27b010ea43e8e.zip
Merge pull request #10457 from bfredl/dwfloat
compositor: handle float overlapping left half of doublewidth char
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r--test/functional/ui/float_spec.lua72
1 files changed, 72 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
index 683a1e0742..a88f69c49e 100644
--- a/test/functional/ui/float_spec.lua
+++ b/test/functional/ui/float_spec.lua
@@ -4473,6 +4473,78 @@ describe('floating windows', function()
]])
end
end)
+
+ it('can overlap doublewidth chars', function()
+ insert([[
+ # TODO: 测试字典信息的准确性
+ # FIXME: 测试字典信息的准确性]])
+ local buf = meths.create_buf(false,false)
+ local win = meths.open_win(buf, false, {relative='editor', width=5, height=3, row=0, col=11, style='minimal'})
+ if multigrid then
+ screen:expect{grid=[[
+ ## grid 1
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ |
+ ## grid 2
+ # TODO: 测试字典信息的准确性 |
+ # FIXME: 测试字典信息的准确^性 |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ ## grid 3
+ {1: }|
+ {1: }|
+ {1: }|
+ ]], float_pos={ [3] = { { id = 1001 }, "NW", 1, 0, 11, true } }}
+ else
+ screen:expect([[
+ # TODO: 测 {1: }信息的准确性 |
+ # FIXME: 测{1: } 信息的准确^性 |
+ {0:~ }{1: }{0: }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ |
+ ]])
+ end
+
+ meths.win_close(win, false)
+ if multigrid then
+ screen:expect([[
+ ## grid 1
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ [2:----------------------------------------]|
+ |
+ ## grid 2
+ # TODO: 测试字典信息的准确性 |
+ # FIXME: 测试字典信息的准确^性 |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ ]])
+ else
+ screen:expect([[
+ # TODO: 测试字典信息的准确性 |
+ # FIXME: 测试字典信息的准确^性 |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ |
+ ]])
+ end
+ end)
end
describe('with ext_multigrid', function()