Commit Diff


commit - f7013a2206fb83e7e5f5d789a2fe16dd5901bd34
commit + fed7eaa8d19e52e6af447e1e7ee0e7357fdea62a
blob - 0a9843c36338b419561453f2046f9af9058e6b2f
blob + 1b742e6c0209ec2ddb3e1160d232e025523588ce
--- tog/tog.c
+++ tog/tog.c
@@ -697,11 +697,10 @@ view_loop(struct tog_view *view)
 				err = view_close(v);
 				if (err)
 					goto done;
-				if (v == view)
-					view = new_view;
 				break;
 			}
 			TAILQ_INSERT_TAIL(&views, new_view, entry);
+			view = new_view;
 			if (focus_view == NULL)
 				focus_view = new_view;
 		}