updated for version 7.0200
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 0e671c8..b2a9327 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -2232,7 +2232,7 @@
 		if (!win_valid(win))
 		    break;
 		win_goto(win);
-		win = win->w_next;
+		win = curwin->w_next;
 	    }
 #endif
 	    else if (eap->cmdidx == CMD_bufdo)