patch 8.2.3757: an overlong highlight group name is silently truncated
Problem: An overlong highlight group name is silently truncated.
Solution: Give an error if the name is too long. (closes #9289)
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index 8e340bc..001cd39 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -740,6 +740,7 @@
call assert_fails('hi Xcomment ctermbg=fg', 'E419:')
call assert_fails('hi Xcomment ctermfg=bg', 'E420:')
call assert_fails('hi Xcomment ctermfg=ul', 'E453:')
+ call assert_fails('hi ' .. repeat('a', 201) .. ' ctermfg=black', 'E1249:')
endif
" Try using a very long terminal code. Define a dummy terminal code for this