updated for version 7.0c11
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0e0bcae..cff6d4c 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7029,7 +7029,9 @@
 	    || eap->cmdidx == CMD_tabfind
 	    || eap->cmdidx == CMD_tabnew)
     {
-	if (win_new_tabpage(cmdmod.tab) != FAIL)
+	if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab
+			 : eap->addr_count == 0 ? 0
+					       : (int)eap->line2 + 1) != FAIL)
 	{
 	    do_exedit(eap, NULL);