aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-02-19 14:22:32 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2022-02-19 15:29:17 +0000
commit73cc729dbc156c5882e1db96b35913d4df48c7ba (patch)
tree6354a17ef3b1f9bde90ce99d18c53ce700a1cf71 /src/nvim/testdir
parent9f4401897a860d10df9ce501eddbde725c943e44 (diff)
downloadrneovim-73cc729dbc156c5882e1db96b35913d4df48c7ba.tar.gz
rneovim-73cc729dbc156c5882e1db96b35913d4df48c7ba.tar.bz2
rneovim-73cc729dbc156c5882e1db96b35913d4df48c7ba.zip
vim-patch:8.2.4419: illegal memory access when using 20 highlights
Problem: Illegal memory access when using exactly 20 highlights. Solution: Add one more item in the array. (Brandon Richardson, closes vim/vim#9800) https://github.com/vim/vim/commit/a493b6506b67887a1cc2d1c00a896598c3b2d445
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_tabline.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tabline.vim b/src/nvim/testdir/test_tabline.vim
index 117d962d08..3a18206078 100644
--- a/src/nvim/testdir/test_tabline.vim
+++ b/src/nvim/testdir/test_tabline.vim
@@ -86,6 +86,17 @@ func Test_tabline_empty_group()
set tabline=
endfunc
+" When there are exactly 20 tabline format items (the exact size of the
+" initial tabline items array), test that we don't write beyond the size
+" of the array.
+func Test_tabline_20_format_items_no_overrun()
+ set showtabline=2
+
+ let tabline = repeat('%#StatColorHi2#', 20)
+ let &tabline = tabline
+ redrawtabline
+ set showtabline& tabline&
+endfunc
" vim: shiftwidth=2 sts=2 expandtab