Mercurial > vim
changeset 5098:cad8d29b0bc0 v7.3.1292
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 03 Jul 2013 14:01:56 +0200 |
parents | 8815a81fa78c |
children | 54383bca4b6e |
files | src/version.c src/window.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1292, +/**/ 1291, /**/ 1290,
--- 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;