[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.180 and 1.181

version 1.180, 2015/04/29 15:59:08 version 1.181, 2015/05/06 07:52:06
Line 500 
Line 500 
 {  {
         int     changed;          int     changed;
   
         if (strcmp(s->ccolour, tty->ccolour))          if (s != NULL && strcmp(s->ccolour, tty->ccolour))
                 tty_force_cursor_colour(tty, s->ccolour);                  tty_force_cursor_colour(tty, s->ccolour);
   
         if (tty->flags & TTY_NOCURSOR)          if (tty->flags & TTY_NOCURSOR)
Line 517 
Line 517 
                 } else                  } else
                         tty_putcode(tty, TTYC_CIVIS);                          tty_putcode(tty, TTYC_CIVIS);
         }          }
         if (tty->cstyle != s->cstyle) {          if (s != NULL && tty->cstyle != s->cstyle) {
                 if (tty_term_has(tty->term, TTYC_SS)) {                  if (tty_term_has(tty->term, TTYC_SS)) {
                         if (s->cstyle == 0 &&                          if (s->cstyle == 0 &&
                             tty_term_has(tty->term, TTYC_SE))                              tty_term_has(tty->term, TTYC_SE))
Line 667 
Line 667 
         struct grid_cell         tmpgc;          struct grid_cell         tmpgc;
         struct utf8_data         ud;          struct utf8_data         ud;
         u_int                    i, sx;          u_int                    i, sx;
           int                      flags;
   
         tty_update_mode(tty, tty->mode & ~MODE_CURSOR, s);          flags = tty->flags & TTY_NOCURSOR;
           tty->flags |= TTY_NOCURSOR;
           tty_update_mode(tty, tty->mode, s);
   
         sx = screen_size_x(s);          sx = screen_size_x(s);
         if (sx > s->grid->linedata[s->grid->hsize + py].cellsize)          if (sx > s->grid->linedata[s->grid->hsize + py].cellsize)
Line 703 
Line 706 
                         tty_cell(tty, gc, wp);                          tty_cell(tty, gc, wp);
         }          }
   
         if (sx >= tty->sx) {          if (sx < tty->sx) {
                 tty_update_mode(tty, tty->mode, s);                  tty_attributes(tty, &grid_default_cell, wp);
                 return;  
                   tty_cursor(tty, ox + sx, oy + py);
                   if (sx != screen_size_x(s) &&
                       ox + screen_size_x(s) >= tty->sx &&
                       tty_term_has(tty->term, TTYC_EL) &&
                       !tty_fake_bce(tty, wp))
                           tty_putcode(tty, TTYC_EL);
                   else
                           tty_repeat_space(tty, screen_size_x(s) - sx);
         }          }
         tty_attributes(tty, &grid_default_cell, wp);  
   
         tty_cursor(tty, ox + sx, oy + py);          tty->flags = (tty->flags & ~TTY_NOCURSOR) | flags;
         if (sx != screen_size_x(s) && ox + screen_size_x(s) >= tty->sx &&  
             tty_term_has(tty->term, TTYC_EL) && !tty_fake_bce(tty, wp))  
                 tty_putcode(tty, TTYC_EL);  
         else  
                 tty_repeat_space(tty, screen_size_x(s) - sx);  
         tty_update_mode(tty, tty->mode, s);          tty_update_mode(tty, tty->mode, s);
 }  }
   

Legend:
Removed from v.1.180  
changed lines
  Added in v.1.181