On Tue, Apr 16, 2013 at 2:36 AM, Nicholas Marriott
<nicholas.marri...@gmail.com> wrote:

>    Can you show the code you changed rather than making me guess? :-)

That would have been a sensible detail to include!  Here is what I changed.
I don't know what this change might break.

--- ../temp/tmux-1.8/screen.c   2013-02-24 04:42:49.000000000 -0800
+++ screen.c    2013-04-16 05:10:49.000000000 -0700
@@ -366,7 +366,12 @@
 screen_reflow(struct screen *s, u_int new_x)
 {
        struct grid     *old = s->grid;
+       int diff;

        s->grid = grid_create(old->sx, old->sy, old->hlimit);
-       s->cy -= grid_reflow(s->grid, old, new_x);
+       diff = grid_reflow(s->grid, old, new_x);
+       if (diff > s->cy) {
+               diff = s->cy;
+       }
+       s->cy -= diff;
 }


>    Are you increasing or decreasing the font size when this happens? Ie
>    does the number of rows shrink or grow?

It happens when I decrease the font size.

>    I think screen_resize_y should be changed to prevent s->cy going
>    negative. Obviously something later on (after screen_reflow) is fixing
>    it up but we shouldn't be relying on that.

Chris
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to