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

Diff for /src/usr.bin/tmux/tty.c between version 1.38 and 1.39

version 1.38, 2009/10/11 22:35:10 version 1.39, 2009/10/12 09:09:35
Line 579 
Line 579 
   
         tty_reset(tty);          tty_reset(tty);
   
         tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff);          tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
   
         tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);          tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);
         tty_emulate_repeat(tty, TTYC_IL, TTYC_IL1, ctx->num);          tty_emulate_repeat(tty, TTYC_IL, TTYC_IL1, ctx->num);
Line 599 
Line 599 
   
         tty_reset(tty);          tty_reset(tty);
   
         tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff);          tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
   
         tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);          tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);
         tty_emulate_repeat(tty, TTYC_DL, TTYC_DL1, ctx->num);          tty_emulate_repeat(tty, TTYC_DL, TTYC_DL1, ctx->num);
Line 675 
Line 675 
   
         if (ctx->ocy == ctx->orupper) {          if (ctx->ocy == ctx->orupper) {
                 tty_reset(tty);                  tty_reset(tty);
                 tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff);  
                   tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
                 tty_cursor(tty, ctx->ocx, ctx->orupper, wp->xoff, wp->yoff);                  tty_cursor(tty, ctx->ocx, ctx->orupper, wp->xoff, wp->yoff);
   
                 tty_putcode(tty, TTYC_RI);                  tty_putcode(tty, TTYC_RI);
         }          }
 }  }
Line 695 
Line 697 
   
         if (ctx->ocy == ctx->orlower) {          if (ctx->ocy == ctx->orlower) {
                 tty_reset(tty);                  tty_reset(tty);
                 tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff);  
                   tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
                 tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);                  tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);
   
                 tty_putc(tty, '\n');                  tty_putc(tty, '\n');
         }          }
 }  }
Line 710 
Line 714 
   
         tty_reset(tty);          tty_reset(tty);
   
         tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);          tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1);
         tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);          tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff);
   
         if (wp->xoff == 0 && screen_size_x(s) >= tty->sx &&          if (wp->xoff == 0 && screen_size_x(s) >= tty->sx &&
             tty_term_has(tty->term, TTYC_EL)) {              tty_term_has(tty->term, TTYC_EL)) {
                 tty_putcode(tty, TTYC_EL);                  tty_putcode(tty, TTYC_EL);
Line 745 
Line 750 
   
         tty_reset(tty);          tty_reset(tty);
   
         tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);          tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1);
         tty_cursor(tty, 0, 0, wp->xoff, wp->yoff);          tty_cursor(tty, 0, 0, wp->xoff, wp->yoff);
   
         if (wp->xoff == 0 && screen_size_x(s) >= tty->sx &&          if (wp->xoff == 0 && screen_size_x(s) >= tty->sx &&
             tty_term_has(tty->term, TTYC_EL)) {              tty_term_has(tty->term, TTYC_EL)) {
                 for (i = 0; i < ctx->ocy; i++) {                  for (i = 0; i < ctx->ocy; i++) {
Line 774 
Line 780 
   
         tty_reset(tty);          tty_reset(tty);
   
         tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);          tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1);
         tty_cursor(tty, 0, 0, wp->xoff, wp->yoff);          tty_cursor(tty, 0, 0, wp->xoff, wp->yoff);
   
         if (wp->xoff == 0 && screen_size_x(s) >= tty->sx &&          if (wp->xoff == 0 && screen_size_x(s) >= tty->sx &&
             tty_term_has(tty->term, TTYC_EL)) {              tty_term_has(tty->term, TTYC_EL)) {
                 for (i = 0; i < screen_size_y(s); i++) {                  for (i = 0; i < screen_size_y(s); i++) {
Line 803 
Line 810 
   
         tty_reset(tty);          tty_reset(tty);
   
         tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);          tty_region_pane(tty, ctx, 0, screen_size_y(s) - 1);
   
         for (j = 0; j < screen_size_y(s); j++) {          for (j = 0; j < screen_size_y(s); j++) {
                 tty_cursor(tty, 0, j, wp->xoff, wp->yoff);                  tty_cursor(tty, 0, j, wp->xoff, wp->yoff);
Line 887 
Line 894 
 }  }
   
 void  void
 tty_region(struct tty *tty, u_int rupper, u_int rlower, u_int oy)  tty_region_pane(
       struct tty *tty, const struct tty_ctx *ctx, u_int rupper, u_int rlower)
 {  {
           struct window_pane      *wp = ctx->wp;
   
           tty_region_absolute(tty, wp->yoff + rupper, wp->yoff + rlower);
   }
   
   void
   tty_region_absolute(struct tty *tty, u_int rupper, u_int rlower)
   {
           if (tty->rlower == rlower && tty->rupper == rupper)
                   return;
         if (!tty_term_has(tty->term, TTYC_CSR))          if (!tty_term_has(tty->term, TTYC_CSR))
                 return;                  return;
         if (tty->rlower != oy + rlower || tty->rupper != oy + rupper) {  
                 tty->rlower = oy + rlower;          tty->rupper = rupper;
                 tty->rupper = oy + rupper;          tty->rlower = rlower;
                 tty->cx = 0;  
                 tty->cy = 0;          tty->cx = 0;
                 tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);          tty->cy = 0;
         }  
           tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);
 }  }
   
 void  void

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39