[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.68 and 1.69

version 1.68, 2011/04/19 21:31:33 version 1.69, 2011/04/24 21:06:12
Line 1225 
Line 1225 
         size_t                           off;          size_t                           off;
         u_int                            i, xx, yy, sx, sy, ex, ey, limit;          u_int                            i, xx, yy, sx, sy, ex, ey, limit;
         u_int                            firstsx, lastex, restex, restsx;          u_int                            firstsx, lastex, restex, restsx;
           int                              keys;
   
         if (!s->sel.flag)          if (!s->sel.flag)
                 return;                  return;
Line 1261 
Line 1262 
          * end (restex) of all other lines.           * end (restex) of all other lines.
          */           */
         xx = screen_size_x(s);          xx = screen_size_x(s);
   
           /*
            * Behave according to mode-keys. If it is emacs, copy like emacs,
            * keeping the top-left-most character, and dropping the
            * bottom-right-most, regardless of copy direction. If it is vi, also
            * keep bottom-right-most character.
            */
           keys = options_get_number(&wp->window->options, "mode-keys");
         if (data->rectflag) {          if (data->rectflag) {
                 /*                  /*
                  * Need to ignore the column with the cursor in it, which for                   * Need to ignore the column with the cursor in it, which for
Line 1268 
Line 1277 
                  */                   */
                 if (data->selx < data->cx) {                  if (data->selx < data->cx) {
                         /* Selection start is on the left. */                          /* Selection start is on the left. */
                         lastex = data->cx;                          if (keys == MODEKEY_EMACS) {
                         restex = data->cx;                                  lastex = data->cx;
                                   restex = data->cx;
                           }
                           else {
                                   lastex = data->cx + 1;
                                   restex = data->cx + 1;
                           }
                         firstsx = data->selx;                          firstsx = data->selx;
                         restsx = data->selx;                          restsx = data->selx;
                 } else {                  } else {
Line 1280 
Line 1295 
                         restsx = data->cx;                          restsx = data->cx;
                 }                  }
         } else {          } else {
                 /*                  if (keys == MODEKEY_EMACS)
                  * Like emacs, keep the top-left-most character, and drop the                          lastex = ex;
                  * bottom-right-most, regardless of copy direction.                  else
                  */                          lastex = ex + 1;
                 lastex = ex;  
                 restex = xx;                  restex = xx;
                 firstsx = sx;                  firstsx = sx;
                 restsx = 0;                  restsx = 0;

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69