patch 9.2.0169: assertion failure in syn_id2attr()

Commit: 
https://github.com/vim/vim/commit/a8052afcb665f7045fc8be72a731f48c016852c0
Author: Foxe Chen <[email protected]>
Date:   Sun Mar 15 09:05:14 2026 +0000

    patch 9.2.0169: assertion failure in syn_id2attr()
    
    Problem:  assertion failure in syn_id2attr()
              (@julio-b, after v9.2.0093)
    Solution: Set tp_curwin to a valid window in popup_close_tabpage()
              and return early in update_winhighlight() if there are
              no highlight overrides to update (Foxe Chen).
    
    fixes:  #19650
    closes: #19670
    
    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 b768787ee..9e9830bd7 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -5758,6 +5758,9 @@ update_winhighlight(win_T *wp, char_u *opt)
     if (arr == NULL && err != NULL)
        return err;
 
+    if (arr == NULL && wp->w_hl == NULL)
+       return NULL;
+
     update_highlight_overrides(wp->w_hl, arr, num);
 
     vim_free(wp->w_hl);
diff --git a/src/popupwin.c b/src/popupwin.c
index 63f9fe3f3..23588c7ca 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3283,6 +3283,12 @@ popup_close_tabpage(tabpage_T *tp, int id, int force)
                }
                back_to_prevwin(wp);
            }
+
+           // Set curwin for tabpage to a valid window, in case we try
+           // accessing it later.
+           if (tp->tp_curwin == wp)
+               tp->tp_curwin = tp->tp_firstwin;
+
            if (prev == NULL)
                *root = wp->w_next;
            else
diff --git a/src/version.c b/src/version.c
index 6fa0448dc..4f9c944a6 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 */
+/**/
+    169,
 /**/
     168,
 /**/

-- 
-- 
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/E1w1hYx-006M6J-NS%40256bit.org.

Raspunde prin e-mail lui