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 #9800)
diff --git a/src/testdir/test_tabline.vim b/src/testdir/test_tabline.vim
index 5560a21..e58a412 100644
--- a/src/testdir/test_tabline.vim
+++ b/src/testdir/test_tabline.vim
@@ -134,6 +134,17 @@
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