diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-15 19:36:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-15 19:36:19 +0800 |
commit | 0818d655288ebd70de728b13fabcfd01a0e2e2ec (patch) | |
tree | 4168aaadd0faa9aab5ad9d12fd47187f2db99f8b /test | |
parent | 75b488d3ef2e9dafba43c72487839aa78950d453 (diff) | |
download | rneovim-0818d655288ebd70de728b13fabcfd01a0e2e2ec.tar.gz rneovim-0818d655288ebd70de728b13fabcfd01a0e2e2ec.tar.bz2 rneovim-0818d655288ebd70de728b13fabcfd01a0e2e2ec.zip |
fix(extmarks): skip virt_text if it is out of window (#25658)
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index df7de77333..e56f82bd9f 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1456,6 +1456,24 @@ describe('extmark decorations', function() ]]} end) + it('virtual text win_col out of window does not break display #25645', function() + screen:try_resize(51, 6) + command('vnew') + meths.buf_set_lines(0, 0, -1, false, { string.rep('a', 50) }) + screen:expect{grid=[[ + ^aaaaaaaaaaaaaaaaaaaaaaaaa│ | + aaaaaaaaaaaaaaaaaaaaaaaaa│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {41:[No Name] [+] }{40:[No Name] }| + | + ]]} + local extmark_opts = { virt_text_win_col = 35, virt_text = { { ' ', 'Comment' } } } + meths.buf_set_extmark(0, ns, 0, 0, extmark_opts) + screen:expect_unchanged() + assert_alive() + end) + it('can have virtual text on folded line', function() insert([[ 11111 |