diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 2 insertions, 1 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 */ |