aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-03 22:24:12 +0800
committerGitHub <noreply@github.com>2023-03-03 22:24:12 +0800
commita88c18c24efe2b0d91882a48c4dedae9b8269806 (patch)
treeca7a48f161162d475a1eaf0e1dda5928f8285bcb /src/nvim/testdir
parentef52592cf8bc158a91b276017d1d2e68a620e7e0 (diff)
downloadrneovim-a88c18c24efe2b0d91882a48c4dedae9b8269806.tar.gz
rneovim-a88c18c24efe2b0d91882a48c4dedae9b8269806.tar.bz2
rneovim-a88c18c24efe2b0d91882a48c4dedae9b8269806.zip
vim-patch:9.0.0527: long sign text may overflow buffer (#22496)
Problem: Long sign text may overflow buffer. Solution: Use a larger buffer. Prevent for overflow. https://github.com/vim/vim/commit/2b1ddf19f8f14365d0b998b4ac12ca85c0923475 Don't change the size of extra[] as it's already large enough. N/A patches for version.c: vim-patch:9.0.0523: more compiler warnings for arguments in small version Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_signs.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_signs.vim b/src/nvim/testdir/test_signs.vim
index 8311955a15..129f1c1a0c 100644
--- a/src/nvim/testdir/test_signs.vim
+++ b/src/nvim/testdir/test_signs.vim
@@ -196,6 +196,20 @@ func Test_sign()
\ bufnr('%'), 'E155:')
endfunc
+func Test_sign_many_bytes()
+ new
+ set signcolumn=number
+ set number
+ call setline(1, 'some text')
+ " composing characters can use many bytes, check for overflow
+ sign define manyBytes text=▶᷄᷅᷆◀᷄᷅᷆᷇
+ sign place 17 line=1 name=manyBytes
+ redraw
+
+ bwipe!
+ sign undefine manyBytes
+endfunc
+
" Undefining placed sign is not recommended.
" Quoting :help sign
"