diff options
author | Daniel Hahler <git@thequod.de> | 2019-09-06 18:17:24 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-06 09:17:24 -0700 |
commit | 1dab52f87897d73c6a922be9b253de22b361cfb3 (patch) | |
tree | 639905f32e8d81bbc2beb244793f51b3ca9cc31b /src/nvim/syntax.c | |
parent | 64caeb13e68c9858ae41ce04131a6f623be5b54d (diff) | |
download | rneovim-1dab52f87897d73c6a922be9b253de22b361cfb3.tar.gz rneovim-1dab52f87897d73c6a922be9b253de22b361cfb3.tar.bz2 rneovim-1dab52f87897d73c6a922be9b253de22b361cfb3.zip |
vim-patch:8.0.1332: enhance quickfix highlighting #10259
Problem: Highlighting in quickfix window could be better. (Axel Bender)
Solution: Use the qfSeparator highlight item. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/93a32e2ec4b5a391c5006ca09f196e6510c8c2e9
This adds `syn_name2attr` already (from previous patch 8.0.1123,
vim/vim@1b9645de3).
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index f7de5f00d0..281ea7c4a3 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7341,6 +7341,18 @@ int syn_name2id(const char_u *name) return i + 1; } +/// Lookup a highlight group name and return its attributes. +/// Return zero if not found. +int syn_name2attr(char_u *name) +{ + int id = syn_name2id(name); + + if (id != 0) { + return syn_id2attr(syn_get_final_id(id)); + } + return 0; +} + /* * Return TRUE if highlight group "name" exists. */ |