Mercurial > vim
changeset 6214:8c3c067b4ae3 v7.4.442
updated for version 7.4.442
Problem: Using unitinialized variable.
Solution: Pass the first window of the tabpage.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 09 Sep 2014 23:11:49 +0200 |
parents | 37c24033b260 |
children | cd7c730a3d42 |
files | src/eval.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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. */