compositor: handle float overlapping left half of doublewidth char

This commit is contained in:
Björn Linse
2019-07-09 14:46:31 +02:00
parent 42bdccdf6c
commit 4af1ada9ef
2 changed files with 91 additions and 7 deletions

View File

@@ -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()