From: Bram Moolenaar Date: Tue, 9 Sep 2014 21:11:49 +0000 (+0200) Subject: updated for version 7.4.442 X-Git-Tag: v7.4.442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3089a1068dd5a0645cea0df09a1c8a1f00146649;p=vim updated for version 7.4.442 Problem: Using unitinialized variable. Solution: Pass the first window of the tabpage. --- diff --git a/src/eval.c b/src/eval.c index 8303bd375..dfcb586b1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -12071,7 +12071,7 @@ f_gettabvar(argvars, rettv) typval_T *argvars; typval_T *rettv; { - win_T *win, *oldcurwin; + win_T *oldcurwin; tabpage_T *tp, *oldtabpage; dictitem_T *v; char_u *varname; @@ -12084,9 +12084,9 @@ f_gettabvar(argvars, rettv) tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL)); if (tp != NULL && varname != NULL) { - /* Set curwin to be our win, temporarily. Also set the tabpage, - * otherwise the window is not valid. */ - switch_win(&oldcurwin, &oldtabpage, win, tp, TRUE); + /* Set tp to be our tabpage, temporarily. Also set the window to the + * first window in the tabpage, otherwise the window is not valid. */ + switch_win(&oldcurwin, &oldtabpage, tp->tp_firstwin, tp, TRUE); /* look up the variable */ /* Let gettabvar({nr}, "") return the "t:" dictionary. */ diff --git a/src/version.c b/src/version.c index 5d512a3cd..70b408755 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 442, /**/ 441, /**/