patch 9.2.0138: winhighlight option handling can be improved

Commit: 
https://github.com/vim/vim/commit/49a5a804106dcaec237478cee12f1ca8f35352c9
Author: Foxe Chen <[email protected]>
Date:   Wed Mar 11 19:37:26 2026 +0000

    patch 9.2.0138: winhighlight option handling can be improved
    
    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/highlight.c b/src/highlight.c
index df34f0307..b768787ee 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -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;
        }
     }
 }
diff --git a/src/version.c b/src/version.c
index 79a30caba..028abc2f0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    138,
 /**/
     137,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1w0PUP-000ZCW-2V%40256bit.org.

Raspunde prin e-mail lui