[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.267 and 1.268

version 1.267, 2017/04/23 18:13:24 version 1.268, 2017/04/25 18:30:29
Line 540 
Line 540 
 tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)  tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)
 {  {
         tty_add(tty, buf, len);          tty_add(tty, buf, len);
         if (tty->cx + width > tty->sx)          if (tty->cx + width > tty->sx) {
                 tty->cx = tty->cy = UINT_MAX;                  tty->cx = (tty->cx + width) - tty->sx;
         else                  if (tty->cx <= tty->sx)
                           tty->cy++;
                   else
                           tty->cx = tty->cy = UINT_MAX;
           } else
                 tty->cx += width;                  tty->cx += width;
 }  }
   
Line 773 
Line 777 
         if (sx > tty->sx)          if (sx > tty->sx)
                 sx = tty->sx;                  sx = tty->sx;
   
         if (screen_size_x(s) < tty->sx &&          if (wp == NULL ||
             ox == 0 &&              py == 0 ||
             sx != screen_size_x(s) &&              (~s->grid->linedata[s->grid->hsize + py - 1].flags & GRID_LINE_WRAPPED) ||
             tty_term_has(tty->term, TTYC_EL1) &&              ox != 0 ||
             !tty_fake_bce(tty, wp, 8)) {              tty->cx < tty->sx ||
                 tty_default_attributes(tty, wp, 8);              screen_size_x(s) < tty->sx) {
                 tty_cursor(tty, screen_size_x(s) - 1, oy + py);                  if (screen_size_x(s) < tty->sx &&
                 tty_putcode(tty, TTYC_EL1);                      ox == 0 &&
                 cleared = 1;                      sx != screen_size_x(s) &&
         }                      tty_term_has(tty->term, TTYC_EL1) &&
         if (sx != 0)                      !tty_fake_bce(tty, wp, 8)) {
                 tty_cursor(tty, ox, oy + py);                          tty_default_attributes(tty, wp, 8);
                           tty_cursor(tty, screen_size_x(s) - 1, oy + py);
                           tty_putcode(tty, TTYC_EL1);
                           cleared = 1;
                   }
                   if (sx != 0)
                           tty_cursor(tty, ox, oy + py);
           } else
                   log_debug("%s: wrapped line %u", __func__, oy + py);
   
         memcpy(&last, &grid_default_cell, sizeof last);          memcpy(&last, &grid_default_cell, sizeof last);
         len = 0;          len = 0;
Line 1477 
Line 1489 
 tty_cursor_pane_unless_wrap(struct tty *tty, const struct tty_ctx *ctx,  tty_cursor_pane_unless_wrap(struct tty *tty, const struct tty_ctx *ctx,
     u_int cx, u_int cy)      u_int cx, u_int cy)
 {  {
         if (!tty_pane_full_width(tty, ctx) ||          if (!ctx->wrapped ||
               !tty_pane_full_width(tty, ctx) ||
             (tty->term->flags & TERM_EARLYWRAP) ||              (tty->term->flags & TERM_EARLYWRAP) ||
             ctx->xoff + cx != 0 ||              ctx->xoff + cx != 0 ||
             ctx->yoff + cy != tty->cy + 1 ||              ctx->yoff + cy != tty->cy + 1 ||

Legend:
Removed from v.1.267  
changed lines
  Added in v.1.268