[BACK]Return to screen.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/screen.c between version 1.2 and 1.3

version 1.2, 2009/06/03 19:33:04 version 1.3, 2009/06/04 18:48:24
Line 18 
Line 18 
   
 #include <sys/types.h>  #include <sys/types.h>
   
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <vis.h>  #include <vis.h>
   
Line 34 
Line 35 
   
         s->title = xstrdup("");          s->title = xstrdup("");
   
           s->tabs = NULL;
   
         screen_reinit(s);          screen_reinit(s);
 }  }
   
Line 48 
Line 51 
         s->rlower = screen_size_y(s) - 1;          s->rlower = screen_size_y(s) - 1;
   
         s->mode = MODE_CURSOR;          s->mode = MODE_CURSOR;
   
           screen_reset_tabs(s);
   
         grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy - 1);          grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy - 1);
   
Line 62 
Line 67 
         grid_destroy(s->grid);          grid_destroy(s->grid);
 }  }
   
   /* Reset tabs to default, eight spaces apart. */
   void
   screen_reset_tabs(struct screen *s)
   {
           u_int   i;
   
           if (s->tabs != NULL)
                   xfree(s->tabs);
   
           if ((s->tabs = bit_alloc(screen_size_x(s))) == NULL)
                   fatal("bit_alloc failed");
           for (i = 8; i < screen_size_x(s); i += 8)
                   bit_set(s->tabs, i);
   }
   
 /* Set screen title. */  /* Set screen title. */
 void  void
 screen_set_title(struct screen *s, const char *title)  screen_set_title(struct screen *s, const char *title)
Line 83 
Line 103 
         if (sy < 1)          if (sy < 1)
                 sy = 1;                  sy = 1;
   
         if (sx != screen_size_x(s))          if (sx != screen_size_x(s)) {
                 screen_resize_x(s, sx);                  screen_resize_x(s, sx);
   
                   /*
                    * It is unclear what should happen to tabs on resize. xterm
                    * seems to try and maintain them, rxvt resets them. Resetting
                    * is simpler and more reliable so let's do that.
                    */
                   screen_reset_tabs(s);
           }
   
         if (sy != screen_size_y(s))          if (sy != screen_size_y(s))
                 screen_resize_y(s, sy);                  screen_resize_y(s, sy);
 }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3