diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-10-04 16:24:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 16:24:33 +0200 |
commit | 3079fa1f9f198bb303fa616004da9c269673c7a5 (patch) | |
tree | bce1c06f58e7fd5672f209ab281f272cfe8f70e8 /src | |
parent | 29fe883aa9166bdbcae3f935523c75a8aa56fe45 (diff) | |
parent | d4872377fef7eeb794ea06321f62281af0cde8e3 (diff) | |
download | rneovim-3079fa1f9f198bb303fa616004da9c269673c7a5.tar.gz rneovim-3079fa1f9f198bb303fa616004da9c269673c7a5.tar.bz2 rneovim-3079fa1f9f198bb303fa616004da9c269673c7a5.zip |
Merge pull request #25491 from glepnir/25474
fix(highlight): attr set all when normal attr changed
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/highlight_group.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c index c526df5de4..5cbff6e3dd 100644 --- a/src/nvim/highlight_group.c +++ b/src/nvim/highlight_group.c @@ -866,9 +866,17 @@ void set_hl_group(int id, HlAttrs attrs, Dict(highlight) *dict, int link_id) if (strcmp(g->sg_name_u, "NORMAL") == 0) { cterm_normal_fg_color = g->sg_cterm_fg; cterm_normal_bg_color = g->sg_cterm_bg; + bool did_changed = false; + if (normal_bg != g->sg_rgb_bg || normal_fg != g->sg_rgb_fg || normal_sp != g->sg_rgb_sp) { + did_changed = true; + } normal_fg = g->sg_rgb_fg; normal_bg = g->sg_rgb_bg; normal_sp = g->sg_rgb_sp; + + if (did_changed) { + highlight_attr_set_all(); + } ui_default_colors_set(); } else { // a cursor style uses this syn_id, make sure its attribute is updated. |