fix(extmarks): account for rightleft when drawing virt text (#25262)

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Ibby
2023-09-21 00:39:54 +10:00
committed by GitHub
parent 818d7f6daf
commit 23c21e7630
3 changed files with 184 additions and 26 deletions

View File

@@ -3047,6 +3047,39 @@ describe("folded lines", function()
{11:-- VISUAL LINE --} |
]])
end
meths.set_option_value('rightleft', true, {})
if multigrid then
screen:expect([[
## grid 1
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[3:------------------------------]|
## grid 2
a si sihT{7: }|
{14:hsilgnE dila}^v{7: -}|
{20: desopmoc ecnetnes}{19: }{15:--}{7: +│}|
{15:······}{20:.evac sih ni}{19: }{15:--}{7: +│}|
{1: ~}|
{1: ~}|
## grid 3
{11:-- VISUAL LINE --} |
]])
else
screen:expect([[
a si sihT{7: }|
{14:hsilgnE dila}^v{7: -}|
{20: desopmoc ecnetnes}{19: }{15:--}{7: +│}|
{15:······}{20:.evac sih ni}{19: }{15:--}{7: +│}|
{1: ~}|
{1: ~}|
{11:-- VISUAL LINE --} |
]])
end
end)
end