mirror of
https://github.com/neovim/neovim
synced 2025-07-16 17:21:49 +00:00
fix(hl): DRY set_hl_group() sg_attr set
(cherry picked from commit 9747e984e1
)
This commit is contained in:
committed by
github-actions[bot]
parent
512a8197c8
commit
ee210b0f74
@ -735,6 +735,8 @@ void set_hl_group(int id, HlAttrs attrs, Dict(highlight) *dict, int link_id)
|
||||
g->sg_script_ctx = current_sctx;
|
||||
g->sg_script_ctx.sc_lnum += sourcing_lnum;
|
||||
|
||||
g->sg_attr = hl_get_syn_attr(0, id, attrs);
|
||||
|
||||
// 'Normal' is special
|
||||
if (STRCMP(g->sg_name_u, "NORMAL") == 0) {
|
||||
cterm_normal_fg_color = g->sg_cterm_fg;
|
||||
@ -743,10 +745,7 @@ void set_hl_group(int id, HlAttrs attrs, Dict(highlight) *dict, int link_id)
|
||||
normal_bg = g->sg_rgb_bg;
|
||||
normal_sp = g->sg_rgb_sp;
|
||||
ui_default_colors_set();
|
||||
g->sg_attr = hl_get_syn_attr(0, id, attrs);
|
||||
} else {
|
||||
g->sg_attr = hl_get_syn_attr(0, id, attrs);
|
||||
|
||||
// a cursor style uses this syn_id, make sure its attribute is updated.
|
||||
if (cursor_mode_uses_syn_id(id)) {
|
||||
ui_mode_info_set();
|
||||
|
Reference in New Issue
Block a user