[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.256 and 1.257

version 1.256, 2017/03/24 14:45:00 version 1.257, 2017/04/05 10:45:20
Line 602 
Line 602 
 static void  static void
 tty_repeat_space(struct tty *tty, u_int n)  tty_repeat_space(struct tty *tty, u_int n)
 {  {
         while (n-- > 0)          static char s[500];
                 tty_putc(tty, ' ');  
           if (*s != ' ')
                   memset(s, ' ', sizeof s);
   
           while (n > sizeof s) {
                   tty_putn(tty, s, sizeof s, sizeof s);
                   n -= sizeof s;
           }
           if (n != 0)
                   tty_putn(tty, s, n, n);
 }  }
   
 /*  /*
Line 856 
Line 865 
 void  void
 tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)  tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
 {  {
         u_int   i;  
   
         tty_attributes(tty, &grid_default_cell, ctx->wp);          tty_attributes(tty, &grid_default_cell, ctx->wp);
   
         tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);          tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
Line 865 
Line 872 
         if (tty_term_has(tty->term, TTYC_ECH) &&          if (tty_term_has(tty->term, TTYC_ECH) &&
             !tty_fake_bce(tty, ctx->wp, ctx->bg))              !tty_fake_bce(tty, ctx->wp, ctx->bg))
                 tty_putcode1(tty, TTYC_ECH, ctx->num);                  tty_putcode1(tty, TTYC_ECH, ctx->num);
         else {          else
                 for (i = 0; i < ctx->num; i++)                  tty_repeat_space(tty, ctx->num);
                         tty_putc(tty, ' ');  
         }  
 }  }
   
 void  void

Legend:
Removed from v.1.256  
changed lines
  Added in v.1.257