diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-11-16 17:19:30 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-16 17:19:30 +0000 |
commit | 2a16dc6613368c54d526850bcbcd03c3fec1be67 (patch) | |
tree | 10460457613bd8a165fa05e72f411ec5e7abfaf5 /runtime | |
parent | c143fa0778fa0d8744867318bb7f7a2e63cf37d7 (diff) | |
download | vim-git-2a16dc6613368c54d526850bcbcd03c3fec1be67.tar.gz |
patch 8.2.3605: cannot clear and unlinke a highlight group with hlset()v8.2.3605
Problem: Cannot clear and unlinke a highlight group with hlset() in a
single call.
Solution: Add the "force" option. (Yegappan Lakshmanan, closes #9117)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 88b6f0dbd..acbcd7182 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -6750,7 +6750,7 @@ hlget([{name} [, {resolve}]]) *hlget()* Each entry in the returned List is a Dictionary with the following items: - cleared Boolean flag, set to v:true if the highlight + cleared boolean flag, set to v:true if the highlight group attributes are cleared or not yet specified. See |highlight-clear|. cterm cterm attributes. See |highlight-cterm|. @@ -6759,6 +6759,9 @@ hlget([{name} [, {resolve}]]) *hlget()* ctermfg cterm foreground color. See |highlight-ctermfg|. ctermul cterm underline color. See |highlight-ctermul|. + default boolean flag, set to v:true if the highlight + group link is a default link. See + |highlight-default|. font highlight group font. See |highlight-font|. gui gui attributes. See |highlight-gui|. guibg gui background color. See |highlight-guibg|. @@ -6791,6 +6794,13 @@ hlset({list}) *hlset()* attributes of a highlight group. See |hlget()| for the list of supported items in this dictionary. + In addition to the items described in |hlget()|, the following + additional items are supported in the dictionary: + + force boolean flag to force the creation of + a link for an existing highlight group + with attributes. + The highlight group is identified using the 'name' item and the 'id' item (if supplied) is ignored. If a highlight group with a specified name doesn't exist, then it is created. @@ -6820,6 +6830,11 @@ hlset({list}) *hlset()* :call hlset([#{name: 'Title', term: {}}]) " create the MyHlg group linking it to DiffAdd :call hlset([#{name: 'MyHlg', linksto: 'DiffAdd'}]) + " remove the MyHlg group link + :call hlset([#{name: 'MyHlg', linksto: 'NONE'}]) + " clear the attributes and a link + :call hlset([#{name: 'MyHlg', cleared: v:true, + \ linksto: 'NONE'}]) < Can also be used as a |method|: > GetAttrList()->hlset() |