summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index f857b8fc9..506cfa5bb 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14895,7 +14895,7 @@ f_tabpagebuflist(argvars, rettv)
{
tp = find_tabpage((int)get_tv_number(&argvars[0]));
if (tp != NULL)
- wp = tp->tp_firstwin;
+ wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
}
if (wp == NULL)
rettv->vval.v_number = 0;