[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.187 and 1.188

version 1.187, 2018/03/08 08:09:10 version 1.188, 2018/04/23 13:46:34
Line 1548 
Line 1548 
         char                            *buf;          char                            *buf;
         size_t                           off;          size_t                           off;
         u_int                            i, xx, yy, sx, sy, ex, ey, ey_last;          u_int                            i, xx, yy, sx, sy, ex, ey, ey_last;
         u_int                            firstsx, lastex, restex, restsx;          u_int                            firstsx, lastex, restex, restsx, selx;
         int                              keys;          int                              keys;
   
         if (!s->sel.flag && s->sel.lineflag == LINE_SEL_NONE)          if (!s->sel.flag && s->sel.lineflag == LINE_SEL_NONE)
Line 1599 
Line 1599 
                  * Need to ignore the column with the cursor in it, which for                   * Need to ignore the column with the cursor in it, which for
                  * rectangular copy means knowing which side the cursor is on.                   * rectangular copy means knowing which side the cursor is on.
                  */                   */
                 if (data->selx < data->cx) {                  if (data->cursordrag == CURSORDRAG_ENDSEL)
                           selx = data->selx;
                   else
                           selx = data->endselx;
                   if (selx < data->cx) {
                         /* Selection start is on the left. */                          /* Selection start is on the left. */
                         if (keys == MODEKEY_EMACS) {                          if (keys == MODEKEY_EMACS) {
                                 lastex = data->cx;                                  lastex = data->cx;
Line 1609 
Line 1613 
                                 lastex = data->cx + 1;                                  lastex = data->cx + 1;
                                 restex = data->cx + 1;                                  restex = data->cx + 1;
                         }                          }
                         firstsx = data->selx;                          firstsx = selx;
                         restsx = data->selx;                          restsx = selx;
                 } else {                  } else {
                         /* Cursor is on the left. */                          /* Cursor is on the left. */
                         lastex = data->selx + 1;                          lastex = selx + 1;
                         restex = data->selx + 1;                          restex = selx + 1;
                         firstsx = data->cx;                          firstsx = data->cx;
                         restsx = data->cx;                          restsx = data->cx;
                 }                  }

Legend:
Removed from v.1.187  
changed lines
  Added in v.1.188