summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eval.c3
-rw-r--r--src/testdir/test91.in6
-rw-r--r--src/testdir/test91.ok2
-rw-r--r--src/version.c2
4 files changed, 11 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index fe0a66add..e2f40f0bc 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -12291,7 +12291,8 @@ f_gettabvar(argvars, rettv)
{
/* Set tp to be our tabpage, temporarily. Also set the window to the
* first window in the tabpage, otherwise the window is not valid. */
- if (switch_win(&oldcurwin, &oldtabpage, tp->tp_firstwin, tp, TRUE)
+ if (switch_win(&oldcurwin, &oldtabpage,
+ tp->tp_firstwin == NULL ? firstwin : tp->tp_firstwin, tp, TRUE)
== OK)
{
/* look up the variable */
diff --git a/src/testdir/test91.in b/src/testdir/test91.in
index b66776b1e..e1365cb74 100644
--- a/src/testdir/test91.in
+++ b/src/testdir/test91.in
@@ -5,8 +5,12 @@ STARTTEST
:so small.vim
:so mbyte.vim
:"
-:" Test for getbufvar()
:" Use strings to test for memory leaks.
+:" First, check that in an empty window, gettabvar() returns the correct value
+:let t:testvar='abcd'
+:$put =string(gettabvar(1,'testvar'))
+:$put =string(gettabvar(1,'testvar'))
+:" Test for getbufvar()
:let b:var_num = '1234'
:let def_num = '5678'
:$put =string(getbufvar(1, 'var_num'))
diff --git a/src/testdir/test91.ok b/src/testdir/test91.ok
index 809952b69..62adec10e 100644
--- a/src/testdir/test91.ok
+++ b/src/testdir/test91.ok
@@ -1,4 +1,6 @@
start:
+'abcd'
+'abcd'
'1234'
'1234'
{'var_num': '1234'}
diff --git a/src/version.c b/src/version.c
index 0319edb60..3e46e0fdd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 834,
+/**/
833,
/**/
832,