[BACK]Return to window-copy.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/window-copy.c between version 1.110 and 1.111

version 1.110, 2014/05/14 06:39:58 version 1.111, 2014/06/19 07:37:59
Line 1360 
Line 1360 
         struct screen                   *s = &data->screen;          struct screen                   *s = &data->screen;
         char                            *buf;          char                            *buf;
         size_t                           off;          size_t                           off;
         u_int                            i, xx, yy, sx, sy, ex, ey;          u_int                            i, xx, yy, sx, sy, ex, ey, ey_last;
         u_int                            firstsx, lastex, restex, restsx;          u_int                            firstsx, lastex, restex, restsx;
         int                              keys;          int                              keys;
   
Line 1389 
Line 1389 
         }          }
   
         /* Trim ex to end of line. */          /* Trim ex to end of line. */
         xx = window_copy_find_length(wp, ey);          ey_last = window_copy_find_length(wp, ey);
         if (ex > xx)          if (ex > ey_last)
                 ex = xx;                  ex = ey_last;
   
         /*          /*
          * Deal with rectangle-copy if necessary; four situations: start of           * Deal with rectangle-copy if necessary; four situations: start of
Line 1453 
Line 1453 
                 free(buf);                  free(buf);
                 return (NULL);                  return (NULL);
         }          }
         *len = off - 1; /* remove final \n */          if (keys == MODEKEY_EMACS || lastex <= ey_last)
                   off -= 1; /* remove final \n (unless at end in vi mode) */
           *len = off;
         return (buf);          return (buf);
 }  }
   

Legend:
Removed from v.1.110  
changed lines
  Added in v.1.111