From f3fb77c40262f47e30ebefec547f5c6f83ff58e6 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 8 Dec 2021 21:35:14 -0500 Subject: vim-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 vim/vim#9289) https://github.com/vim/vim/commit/f7f7aaf8aaad34a38d3f159e031c5bcf3394f8f1 --- src/nvim/testdir/test_highlight.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_highlight.vim b/src/nvim/testdir/test_highlight.vim index c38bfa5677..899eb530ec 100644 --- a/src/nvim/testdir/test_highlight.vim +++ b/src/nvim/testdir/test_highlight.vim @@ -661,6 +661,13 @@ function Test_no_space_before_xxx() let &columns = l:org_columns endfunction +" Test for :highlight command errors +func Test_highlight_cmd_errors() + if has('gui_running') || has('nvim') + call assert_fails('hi ' .. repeat('a', 201) .. ' ctermfg=black', 'E1249:') + endif +endfunc + " Test for using RGB color values in a highlight group func Test_xxlast_highlight_RGB_color() CheckCanRunGui -- cgit