=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/resize.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/tmux/resize.c 2013/03/21 18:46:12 1.9 --- src/usr.bin/tmux/resize.c 2013/03/24 09:57:59 1.10 *************** *** 1,4 **** ! /* $OpenBSD: resize.c,v 1.9 2013/03/21 18:46:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: resize.c,v 1.10 2013/03/24 09:57:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 50,56 **** struct window *w; struct window_pane *wp; u_int i, j, ssx, ssy, has, limit; ! int flag, has_status; RB_FOREACH(s, sessions, &sessions) { has_status = options_get_number(&s->options, "status"); --- 50,56 ---- struct window *w; struct window_pane *wp; u_int i, j, ssx, ssy, has, limit; ! int flag, has_status, is_zoomed; RB_FOREACH(s, sessions, &sessions) { has_status = options_get_number(&s->options, "status"); *************** *** 123,134 **** if (w->sx == ssx && w->sy == ssy) continue; - log_debug("window size %u,%u (was %u,%u)", ssx, ssy, w->sx, w->sy); layout_resize(w, ssx, ssy); window_resize(w, ssx, ssy); /* * If the current pane is now not visible, move to the next --- 123,138 ---- if (w->sx == ssx && w->sy == ssy) continue; log_debug("window size %u,%u (was %u,%u)", ssx, ssy, w->sx, w->sy); + is_zoomed = w->flags & WINDOW_ZOOMED; + if (is_zoomed) + window_unzoom(w); layout_resize(w, ssx, ssy); window_resize(w, ssx, ssy); + if (is_zoomed && window_pane_visible(w->active)) + window_zoom(w->active); /* * If the current pane is now not visible, move to the next