]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0169: assertion failure in syn_id2attr() v9.2.0169
authorFoxe Chen <chen.foxe@gmail.com>
Sun, 15 Mar 2026 09:05:14 +0000 (09:05 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 15 Mar 2026 09:05:14 +0000 (09:05 +0000)
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 <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/highlight.c
src/popupwin.c
src/version.c

index b768787eec8f1d2ba4f2b2b801ce689cd32e36df..9e9830bd7dc3661f25e30d2ecbf33d316678b31f 100644 (file)
@@ -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);
index 63f9fe3f3b9aced533c1dc5d7d4a7fb1f00c434f..23588c7ca48e70a3218eb2455e1f39fd0542e799 100644 (file)
@@ -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
index 6fa0448dc0554be2c8b14b79b8323cc148ff77fc..4f9c944a621d92729019a0c7c7b20e78c9158e85 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    169,
 /**/
     168,
 /**/