Mercurial > vim
comparison src/testdir/test_signs.vim @ 26424:f6ca4276c4cc v8.2.3743
patch 8.2.3743: ":sign" can add a highlight group without a name
Commit: https://github.com/vim/vim/commit/5e18ccc60bdddc4aa39ab039f1a7c918f29e67ce
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 5 13:02:50 2021 +0000
patch 8.2.3743: ":sign" can add a highlight group without a name
Problem: ":sign" can add a highlight group without a name.
Solution: Give an error if the group name is missing. (closes https://github.com/vim/vim/issues/9280)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Dec 2021 14:15:03 +0100 |
parents | 365e7f083f02 |
children | 99a512bd8423 |
comparison
equal
deleted
inserted
replaced
26423:2f222239640f | 26424:f6ca4276c4cc |
---|---|
123 | 123 |
124 " Only 1 or 2 character text is allowed | 124 " Only 1 or 2 character text is allowed |
125 call assert_fails("sign define Sign4 text=abc linehl=Comment", 'E239:') | 125 call assert_fails("sign define Sign4 text=abc linehl=Comment", 'E239:') |
126 call assert_fails("sign define Sign4 text= linehl=Comment", 'E239:') | 126 call assert_fails("sign define Sign4 text= linehl=Comment", 'E239:') |
127 call assert_fails("sign define Sign4 text=\\ ab linehl=Comment", 'E239:') | 127 call assert_fails("sign define Sign4 text=\\ ab linehl=Comment", 'E239:') |
128 | |
129 call assert_fails("sign define Sign4 linehl=", 'E1249: Group name missing for linehl') | |
130 call assert_fails("sign define Sign4 culhl=", 'E1249: Group name missing for culhl') | |
131 call assert_fails("sign define Sign4 texthl=", 'E1249: Group name missing for texthl') | |
128 | 132 |
129 " define sign with whitespace | 133 " define sign with whitespace |
130 sign define Sign4 text=\ X linehl=Comment | 134 sign define Sign4 text=\ X linehl=Comment |
131 sign undefine Sign4 | 135 sign undefine Sign4 |
132 sign define Sign4 linehl=Comment text=\ X | 136 sign define Sign4 linehl=Comment text=\ X |