[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.12 and 1.13

version 1.12, 2002/02/16 21:27:49 version 1.13, 2002/02/20 22:30:54
Line 169 
Line 169 
   
         /* current line */          /* current line */
         lp1 = curwp->w_dotp;          lp1 = curwp->w_dotp;
   
         /* special case for the end */          /* special case for the end */
         if (lp1 == curbp->b_linep) {          if (lp1 == curbp->b_linep) {
                 LINE *lp2, *lp3;                  LINE *lp2, *lp3;
Line 182 
Line 182 
                 /* allocate a new line */                  /* allocate a new line */
                 if ((lp2 = lalloc(n)) == NULL)                  if ((lp2 = lalloc(n)) == NULL)
                         return FALSE;                          return FALSE;
   
                 /* previous line */                  /* previous line */
                 lp3 = lp1->l_bp;                  lp3 = lp1->l_bp;
                 /* link in */                  /* link in */
Line 200 
Line 199 
                         if (wp->w_markp == lp1)                          if (wp->w_markp == lp1)
                                 wp->w_markp = lp2;                                  wp->w_markp = lp2;
                 }                  }
                   if (!undoaction)
                           undo_add_insert(lp2, 0, n);
                 curwp->w_doto = n;                  curwp->w_doto = n;
                 return TRUE;                  return TRUE;
         }          }
Line 230 
Line 230 
                                 wp->w_marko += n;                                  wp->w_marko += n;
                 }                  }
         }          }
           if (!undoaction)
                   undo_add_insert(curwp->w_dotp, doto, n);
         return TRUE;          return TRUE;
 }  }
   
Line 311 
Line 312 
         int      doto;          int      doto;
         char    *cp1, *cp2;          char    *cp1, *cp2;
   
           if (!undoaction) {
                   undo_add_delete(curwp->w_dotp, curwp->w_doto, n);
           }
   
         /*          /*
          * HACK - doesn't matter, and fixes back-over-nl bug for empty           * HACK - doesn't matter, and fixes back-over-nl bug for empty
          *      kill buffers.           *      kill buffers.
Line 466 
Line 471 
         int     rtype;  /* capitalization                */          int     rtype;  /* capitalization                */
         int     c;      /* used for random characters    */          int     c;      /* used for random characters    */
         int     doto;   /* offset into line              */          int     doto;   /* offset into line              */
   
         /*          /*
          * Find the capitalization of the word that was found.  f says use           * Find the capitalization of the word that was found.  f says use
          * exact case of replacement string (same thing that happens with           * exact case of replacement string (same thing that happens with
Line 485 
Line 490 
                         }                          }
                 }                  }
         }          }
   
         /*          /*
          * make the string lengths match (either pad the line           * make the string lengths match (either pad the line
          * so that it will fit, or scrunch out the excess).           * so that it will fit, or scrunch out the excess).
Line 528 
Line 534 
         lchange(WFHARD);          lchange(WFHARD);
         return (TRUE);          return (TRUE);
 }  }
   
   
 /*  /*
  * Delete all of the text saved in the kill buffer.  Called by commands when   * Delete all of the text saved in the kill buffer.  Called by commands when

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13