mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix(hl): DRY set_hl_group() sg_attr set
This commit is contained in:
@@ -738,6 +738,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;
|
||||
@@ -746,10 +748,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