From: Bram Moolenaar Date: Wed, 3 Jul 2013 12:01:56 +0000 (+0200) Subject: updated for version 7.3.1292 X-Git-Tag: v7.3.1292 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e6d5ca16c8d35abd28fdeb7f2600ce5e8aeacc1;p=vim updated for version 7.3.1292 Problem: Possibly using invalid pointer when searcing for window. (Raichoo) Solution: Use "firstwin" instead of "tp_firstwin" for current tab. --- diff --git a/src/version.c b/src/version.c index 8c4982187..d661c6436 100644 --- a/src/version.c +++ b/src/version.c @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1292, /**/ 1291, /**/ diff --git a/src/window.c b/src/window.c index 54ab20080..2435952e1 100644 --- a/src/window.c +++ b/src/window.c @@ -4077,7 +4077,8 @@ win_find_tabpage(win) tabpage_T *tp; for (tp = first_tabpage; tp != NULL; tp = tp->tp_next) - for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next) + for (wp = (tp == curtab ? firstwin : tp->tp_firstwin); + wp != NULL; wp = wp->w_next) if (wp == win) return tp; return NULL;