version 1.39, 2006/05/28 23:30:16 |
version 1.40, 2006/06/01 09:00:50 |
|
|
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)); |
} |
} |
|
|
|
|
* 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) |
|
|
/* 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) { |