diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-12 12:10:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-12 12:10:27 +0800 |
commit | 172227a44642b67ec8af5b438e5373a3daf61fdb (patch) | |
tree | 3249c062a84ca4c9592d522b499c5834208bab09 /test/functional/ui/float_spec.lua | |
parent | 1c4b3d41b538078234282cfba74e5cf07c42c916 (diff) | |
download | rneovim-172227a44642b67ec8af5b438e5373a3daf61fdb.tar.gz rneovim-172227a44642b67ec8af5b438e5373a3daf61fdb.tar.bz2 rneovim-172227a44642b67ec8af5b438e5373a3daf61fdb.zip |
fix(screen): correctly draw background and eob with 'rightleft' (#22640)
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r-- | test/functional/ui/float_spec.lua | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 6e67ec1f24..4e691512c1 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -9224,6 +9224,55 @@ describe('float window', function() feed('<C-C>') screen:expect_unchanged() end) + + it('with rightleft and border #22640', function() + local float_opts = {relative='editor', width=5, height=3, row=1, col=1, border='single'} + meths.open_win(meths.create_buf(false, false), true, float_opts) + command('setlocal rightleft') + feed('iabc<CR>def<Esc>') + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [3:----------------------------------------]| + ## grid 2 + | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + ## grid 3 + | + ## grid 4 + {5:┌─────┐}| + {5:│}{1: cba}{5:│}| + {5:│}{1: ^fed}{5:│}| + {5:│}{2: ~}{5:│}| + {5:└─────┘}| + ]], float_pos={ + [4] = {{id = 1001}, "NW", 1, 1, 1, true, 50}; + }, win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + [4] = {win = {id = 1001}, topline = 0, botline = 3, curline = 1, curcol = 2, linecount = 2}; + }} + else + screen:expect{grid=[[ + | + {0:~}{5:┌─────┐}{0: }| + {0:~}{5:│}{1: cba}{5:│}{0: }| + {0:~}{5:│}{1: ^fed}{5:│}{0: }| + {0:~}{5:│}{2: ~}{5:│}{0: }| + {0:~}{5:└─────┘}{0: }| + | + ]]} + end + end) end describe('with ext_multigrid', function() |