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

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

version 1.39, 2006/05/28 23:30:16 version 1.40, 2006/06/01 09:00:50
Line 377 
Line 377 
                 ewprintf("Buffer is read only");                  ewprintf("Buffer is read only");
                 return (FALSE);                  return (FALSE);
         }          }
           curwp->w_bufp->b_lines++;
           curwp->w_dotline++;
         return (lnewline_at(curwp->w_dotp, curwp->w_doto));          return (lnewline_at(curwp->w_dotp, curwp->w_doto));
 }  }
   
Line 473 
Line 475 
  * operation.  Even if nothing is done, this makes the kill buffer work   * operation.  Even if nothing is done, this makes the kill buffer work
  * "right".  Easy cases can be done by shuffling data around.  Hard cases   * "right".  Easy cases can be done by shuffling data around.  Hard cases
  * require that lines be moved about in memory.  Return FALSE on error and   * require that lines be moved about in memory.  Return FALSE on error and
  * TRUE if all looks ok.   * TRUE if all looks ok. We do not update w_dotline here, as deletes are done
    * after moves.
  */   */
 int  int
 ldelnewline(void)  ldelnewline(void)
Line 491 
Line 494 
         /* at the end of the buffer */          /* at the end of the buffer */
         if (lp2 == curbp->b_linep)          if (lp2 == curbp->b_linep)
                 return (TRUE);                  return (TRUE);
           curwp->w_bufp->b_lines--;
         if (lp2->l_used <= lp1->l_size - lp1->l_used) {          if (lp2->l_used <= lp1->l_size - lp1->l_used) {
                 bcopy(&lp2->l_text[0], &lp1->l_text[lp1->l_used], lp2->l_used);                  bcopy(&lp2->l_text[0], &lp1->l_text[lp1->l_used], lp2->l_used);
                 for (wp = wheadp; wp != NULL; wp = wp->w_wndp) {                  for (wp = wheadp; wp != NULL; wp = wp->w_wndp) {

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