[BACK]Return to util.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/util.c between version 1.39 and 1.40

version 1.39, 2018/12/18 20:35:34 version 1.40, 2018/12/26 07:01:22
Line 411 
Line 411 
  * Delete forward.  This is real easy, because the basic delete routine does   * Delete forward.  This is real easy, because the basic delete routine does
  * all of the work.  Watches for negative arguments, and does the right thing.   * all of the work.  Watches for negative arguments, and does the right thing.
  * If any argument is present, it kills rather than deletes, to prevent loss   * If any argument is present, it kills rather than deletes, to prevent loss
  * of text if typed with a big argument.  Normally bound to "C-d".   * of text if typed with a big argument.  Normally bound to "C-D".
  * If the cursor is in a region, kill the region.  
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 int  int
Line 421 
Line 420 
         if (n < 0)          if (n < 0)
                 return (backdel(f | FFRAND, -n));                  return (backdel(f | FFRAND, -n));
   
         if (curwp->w_markp != NULL)  
                 return(killregion(FFRAND, 1));  
   
         /* really a kill */          /* really a kill */
         if (f & FFARG) {          if (f & FFARG) {
                 if ((lastflag & CFKILL) == 0)                  if ((lastflag & CFKILL) == 0)
Line 438 
Line 434 
  * Delete backwards.  This is quite easy too, because it's all done with   * Delete backwards.  This is quite easy too, because it's all done with
  * other functions.  Just move the cursor back, and delete forwards.  Like   * other functions.  Just move the cursor back, and delete forwards.  Like
  * delete forward, this actually does a kill if presented with an argument.   * delete forward, this actually does a kill if presented with an argument.
  * If the cursor is in a region, kill the region.  
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 int  int
Line 448 
Line 443 
   
         if (n < 0)          if (n < 0)
                 return (forwdel(f | FFRAND, -n));                  return (forwdel(f | FFRAND, -n));
   
         if (curwp->w_markp != NULL)  
                 return (killregion(FFRAND, 1));  
   
         /* really a kill */          /* really a kill */
         if (f & FFARG) {          if (f & FFARG) {

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40