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

Diff for /src/usr.bin/mg/paragraph.c between version 1.33 and 1.34

version 1.33, 2014/10/13 21:01:05 version 1.34, 2014/10/17 13:25:13
Line 90 
Line 90 
   
                         curwp->w_dotp = lforw(curwp->w_dotp);                          curwp->w_dotp = lforw(curwp->w_dotp);
                         curwp->w_dotline++;                          curwp->w_dotline++;
   
                           /* do not continue after end of buffer */
                           if (lforw(curwp->w_dotp) == curbp->b_headp) {
                                   gotoeol(FFRAND, 1);
                                   curwp->w_rflag |= WFMOVE;
                                   return (FALSE);
                           }
                 }                  }
         }          }
         /* covers corner case of no '\n' at end of buffer */  
         if (lforw(curwp->w_dotp) == curbp->b_headp)  
                 gotoeol(FFRAND, 1);  
   
         /* force screen update */          /* force screen update */
         curwp->w_rflag |= WFMOVE;          curwp->w_rflag |= WFMOVE;
Line 242 
Line 246 
 int  int
 killpara(int f, int n)  killpara(int f, int n)
 {  {
         int     status;         /* returned status of functions */          int     status, end = FALSE;    /* returned status of functions */
   
         /* for each paragraph to delete */          /* for each paragraph to delete */
         while (n--) {          while (n--) {
   
                 /* mark out the end and beginning of the para to delete */                  /* mark out the end and beginning of the para to delete */
                 (void)gotoeop(FFRAND, 1);                  if (!gotoeop(FFRAND, 1))
                           end = TRUE;
   
                 /* set the mark here */                  /* set the mark here */
                 curwp->w_markp = curwp->w_dotp;                  curwp->w_markp = curwp->w_dotp;
Line 263 
Line 268 
                 /* and delete it */                  /* and delete it */
                 if ((status = killregion(FFRAND, 1)) != TRUE)                  if ((status = killregion(FFRAND, 1)) != TRUE)
                         return (status);                          return (status);
   
                   if (end)
                           return (TRUE);
         }          }
         return (TRUE);          return (TRUE);
 }  }

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34