aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2014-12-18 20:47:53 +0100
committerFlorian Walch <florian@fwalch.com>2014-12-18 21:22:46 +0100
commit3f7b8199df130145143016536e3cc46fd8ef65ff (patch)
tree165865b9c597a85c543cd242cb41f7028d0ec34f /src/nvim/eval.c
parent815fe2845015e61bb5aaf46b458b8fbc5a4218b3 (diff)
downloadrneovim-3f7b8199df130145143016536e3cc46fd8ef65ff.tar.gz
rneovim-3f7b8199df130145143016536e3cc46fd8ef65ff.tar.bz2
rneovim-3f7b8199df130145143016536e3cc46fd8ef65ff.zip
vim-patch:7.4.442
Problem: Using unitinialized variable. Solution: Pass the first window of the tabpage. https://code.google.com/p/vim/source/detail?r=v7-4-442
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index ac557eb07f..c79a467889 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -9603,7 +9603,7 @@ static void f_getregtype(typval_T *argvars, typval_T *rettv)
*/
static void f_gettabvar(typval_T *argvars, typval_T *rettv)
{
- win_T *win, *oldcurwin;
+ win_T *oldcurwin;
tabpage_T *tp, *oldtabpage;
dictitem_T *v;
char_u *varname;
@@ -9615,9 +9615,9 @@ static void f_gettabvar(typval_T *argvars, typval_T *rettv)
varname = get_tv_string_chk(&argvars[1]);
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. */