[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.210 and 1.211

version 1.210, 2016/10/13 20:27:27 version 1.211, 2016/10/14 21:48:00
Line 424 
Line 424 
 tty_putc(struct tty *tty, u_char ch)  tty_putc(struct tty *tty, u_char ch)
 {  {
         const char      *acs;          const char      *acs;
         u_int            sx;  
   
         if (tty->cell.attr & GRID_ATTR_CHARSET) {          if (tty->cell.attr & GRID_ATTR_CHARSET) {
                 acs = tty_acs_get(tty, ch);                  acs = tty_acs_get(tty, ch);
Line 436 
Line 435 
                 bufferevent_write(tty->event, &ch, 1);                  bufferevent_write(tty->event, &ch, 1);
   
         if (ch >= 0x20 && ch != 0x7f) {          if (ch >= 0x20 && ch != 0x7f) {
                 sx = tty->sx;                  if (tty->cx >= tty->sx) {
                 if (tty->term->flags & TERM_EARLYWRAP)  
                         sx--;  
   
                 if (tty->cx >= sx) {  
                         tty->cx = 1;                          tty->cx = 1;
                         if (tty->cy != tty->rlower)                          if (tty->cy != tty->rlower)
                                 tty->cy++;                                  tty->cy++;
   
                           /*
                            * On !xenl terminals, force the cursor position to
                            * where we think it should be after a line wrap - this
                            * means it works on sensible terminals as well.
                            */
                           if (tty->term->flags & TERM_EARLYWRAP)
                                   tty_putcode2(tty, TTYC_CUP, tty->cy, tty->cx);
                 } else                  } else
                         tty->cx++;                          tty->cx++;
         }          }
Line 1169 
Line 1172 
         u_int   i;          u_int   i;
   
         /* Skip last character if terminal is stupid. */          /* Skip last character if terminal is stupid. */
         if (tty->term->flags & TERM_EARLYWRAP &&          if ((tty->term->flags & TERM_EARLYWRAP) &&
             tty->cy == tty->sy - 1 && tty->cx == tty->sx - 1)              tty->cy == tty->sy - 1 &&
               tty->cx == tty->sx - 1)
                 return;                  return;
   
         /* If this is a padding character, do nothing. */          /* If this is a padding character, do nothing. */

Legend:
Removed from v.1.210  
changed lines
  Added in v.1.211