]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0138: winhighlight option handling can be improved v9.2.0138
authorFoxe Chen <chen.foxe@gmail.com>
Wed, 11 Mar 2026 19:37:26 +0000 (19:37 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 11 Mar 2026 19:42:46 +0000 (19:42 +0000)
Problem:  winhighlight option handling can be improved
          (after: v9.2.0093)
Solution: Check entire override stack in update_highlight_overrides();
          update w_hl of every window in highlight_changed() (Foxe Chen).

closes: #19633

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/highlight.c
src/version.c

index df34f03075466fc3fd2e938645bcac1e6d1b410b..b768787eec8f1d2ba4f2b2b801ce689cd32e36df 100644 (file)
@@ -4371,8 +4371,14 @@ highlight_changed(void)
        }
     }
 
+    // Highlight ids may have been changed, so keep windows up to date
     FOR_ALL_WINDOWS(wp)
-       wp->w_hlfwin_id = hlf_get_id(wp, HLF_WIN);
+    {
+       char *errmsg = update_winhighlight(wp, wp->w_p_whl);
+
+       if (errmsg != NULL)
+           emsg(_(errmsg));
+    }
 
 #ifdef FEAT_TERMINAL
     term_update_hlfwin_all();
@@ -5480,7 +5486,6 @@ update_highlight_overrides(hl_override_T *old, hl_override_T *hl_new, int newlen
        {
            set->arr = hl_new;
            set->len = newlen;
-           break;
        }
     }
 }
index 79a30caba318ffe9e827d12aa2248d50984d340d..028abc2f084c07543b1e67430d3e2fce50b6f0a5 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    138,
 /**/
     137,
 /**/