version 1.39, 2018/12/18 20:35:34 |
version 1.40, 2018/12/26 07:01:22 |
|
|
* 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 |
|
|
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) |
|
|
* 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 |
|
|
|
|
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) { |