diff options
author | Ibby <33922797+SleepySwords@users.noreply.github.com> | 2023-06-24 20:39:16 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-24 11:39:16 +0100 |
commit | 31a51acdc3534f316dfedfaa37fea715f2a4814d (patch) | |
tree | d974f3a833d20ca76915f85152290cdcdb42caca /test/functional | |
parent | fa0a25dcb3a4fd2d6f03e09bcc7edac2f9ea8ded (diff) | |
download | rneovim-31a51acdc3534f316dfedfaa37fea715f2a4814d.tar.gz rneovim-31a51acdc3534f316dfedfaa37fea715f2a4814d.tar.bz2 rneovim-31a51acdc3534f316dfedfaa37fea715f2a4814d.zip |
fix(extmarks): fix heap buffer overflow caused by inline virtual text (#23851)
also fixes an edge case where the extends character would not be drawn if the real text exactly fits the grid.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 5de0106a8c..e8ad0d3f0d 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -2506,6 +2506,28 @@ bbbbbbb]]) | ]]} end) + + it('list "extends" is drawn with only inline virtual text offscreen', function() + command('set nowrap') + command('set list') + command('set listchars+=extends:c') + meths.buf_set_extmark(0, ns, 0, 0, + { virt_text = { { 'test', 'Special' } }, virt_text_pos = 'inline' }) + insert(string.rep('a', 50)) + feed('gg0') + screen:expect { grid = [[ + ^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{1:c}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() |