[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.139 and 1.140

version 1.139, 2012/08/14 08:58:25 version 1.140, 2012/09/03 15:47:40
Line 44 
Line 44 
 void    tty_colours_bg(struct tty *, const struct grid_cell *);  void    tty_colours_bg(struct tty *, const struct grid_cell *);
   
 int     tty_large_region(struct tty *, const struct tty_ctx *);  int     tty_large_region(struct tty *, const struct tty_ctx *);
 void    tty_cra_pane(struct tty *,  
     const struct tty_ctx *, u_int, u_int, u_int, u_int, u_int, u_int);  
 void    tty_era_pane(struct tty *,  
     const struct tty_ctx *, u_int, u_int, u_int, u_int);  
 void    tty_redraw_region(struct tty *, const struct tty_ctx *);  void    tty_redraw_region(struct tty *, const struct tty_ctx *);
 void    tty_emulate_repeat(  void    tty_emulate_repeat(
             struct tty *, enum tty_code_code, enum tty_code_code, u_int);              struct tty *, enum tty_code_code, enum tty_code_code, u_int);
Line 57 
Line 53 
   
 #define tty_use_acs(tty) \  #define tty_use_acs(tty) \
         (tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8))          (tty_term_has((tty)->term, TTYC_ACSC) && !((tty)->flags & TTY_UTF8))
 #define tty_use_rect(tty) \  
         ((tty)->xterm_version > 270)  
   
 #define tty_pane_full_width(tty, ctx) \  #define tty_pane_full_width(tty, ctx) \
         ((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx)          ((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx)
Line 251 
Line 245 
         if (tty->xterm_version != 0)          if (tty->xterm_version != 0)
                 return;                  return;
         tty->xterm_version = version;          tty->xterm_version = version;
   
         if (tty->xterm_version > 270) {  
                 tty_puts(tty, "\033[65;1\"p");  
   
                 tty_putcode(tty, TTYC_RMACS);  
                 memcpy(&tty->cell, &grid_default_cell, sizeof tty->cell);  
   
                 tty->cx = UINT_MAX;  
                 tty->cy = UINT_MAX;  
   
                 tty->rupper = UINT_MAX;  
                 tty->rlower = UINT_MAX;  
         }  
 }  }
   
 void  void
Line 697 
Line 678 
 }  }
   
 void  void
 tty_cra_pane(struct tty *tty, const struct tty_ctx *ctx,  
     u_int t, u_int l, u_int b, u_int r, u_int tt, u_int tl)  
 {  
         char     tmp[64];  
   
         snprintf(tmp, sizeof tmp,  
                  "\033[%u;%u;%u;%u;1;%u;%u;1$v",  
                  ctx->yoff + t + 1,  
                  ctx->xoff + l + 1,  
                  ctx->yoff + b + 1,  
                  ctx->xoff + r + 1,  
                  ctx->yoff + tt + 1,  
                  ctx->xoff + tl + 1);  
         tty_puts(tty, tmp);  
 }  
   
 void  
 tty_era_pane(struct tty *tty, const struct tty_ctx *ctx,  
     u_int t, u_int l, u_int b, u_int r)  
 {  
         char     tmp[64];  
   
         snprintf(tmp, sizeof tmp,  
                  "\033[%u;%u;%u;%u$z",  
                  ctx->yoff + t + 1,  
                  ctx->xoff + l + 1,  
                  ctx->yoff + b + 1,  
                  ctx->xoff + r + 1);  
         tty_puts(tty, tmp);  
 }  
   
 void  
 tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx)  tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx)
 {  {
         struct window_pane      *wp = ctx->wp;          struct window_pane      *wp = ctx->wp;
Line 877 
Line 826 
 tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx)  tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx)
 {  {
         struct window_pane      *wp = ctx->wp;          struct window_pane      *wp = ctx->wp;
         struct screen           *s = wp->screen;  
   
         if (ctx->ocy != ctx->orlower)          if (ctx->ocy != ctx->orlower)
                 return;                  return;
Line 886 
Line 834 
             !tty_term_has(tty->term, TTYC_CSR)) {              !tty_term_has(tty->term, TTYC_CSR)) {
                 if (tty_large_region(tty, ctx))                  if (tty_large_region(tty, ctx))
                         wp->flags |= PANE_REDRAW;                          wp->flags |= PANE_REDRAW;
                 else if (tty_use_rect(tty)) {                  else
                         tty_cra_pane (tty, ctx, ctx->orupper + 1, 0,  
                             ctx->orlower, screen_size_x(s) - 1,  
                             ctx->orupper, 0);  
                         tty_cmd_clearline(tty, ctx);  
                 } else  
                         tty_redraw_region(tty, ctx);                          tty_redraw_region(tty, ctx);
                 return;                  return;
         }          }

Legend:
Removed from v.1.139  
changed lines
  Added in v.1.140