On Fri, Feb 1, 2013 at 6:30 AM, Nicholas Marriott
<nicholas.marri...@gmail.com> wrote:
>
> Hi
>
> Take a look at this please.
>
> We reflow in window_pane_resize when the alternate screen is off
> (saved_grid == NULL) and always when switching back from alternate
> screen. No need to reflow from any of the modes.

One quick fix: The original screen needs to get reflowed when
switching out of the alternate screen.  This is a tiny patch on top of
your patch, which otherwise LGTM (also attaching due to Gmail borking
the whitespace):

diff --git a/window.c b/window.c
index ad357a8..aed7596 100644
--- a/window.c
+++ b/window.c
@@ -943,7 +943,7 @@ window_pane_alternate_off(struct window_pane *wp,
struct grid_cell *gc,
  * the current size.
  */
  wp->base.grid->flags |= GRID_HISTORY;
- if (sy > wp->saved_grid->sy)
+ if (sy > wp->saved_grid->sy || sx != wp->saved_grid->sx)
  screen_resize(s, sx, sy, 1);

  grid_destroy(wp->saved_grid);
diff --git a/window.c b/window.c
index ad357a8..aed7596 100644
--- a/window.c
+++ b/window.c
@@ -943,7 +943,7 @@ window_pane_alternate_off(struct window_pane *wp, struct 
grid_cell *gc,
         * the current size.
         */
        wp->base.grid->flags |= GRID_HISTORY;
-       if (sy > wp->saved_grid->sy)
+       if (sy > wp->saved_grid->sy || sx != wp->saved_grid->sx)
                screen_resize(s, sx, sy, 1);
 
        grid_destroy(wp->saved_grid);
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to