home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************
- * TEXTRA AREXX script -- Mike Haas, 1991, All Rights Reserved. *
- * Freely distributable ONLY as a component of the TEXTRA package. *
- * This banner may not be removed or altered (improvements to the *
- * actual program welcome). Please document and send to me. *
- * !!! PLACE THIS FILE IN YOUR REXX: DIRECTORY !!! *
- ******************************************************************/
-
- /* Usage: DelToStart
- *
- * This script accepts no parameters, and simply deletes to the start of the
- * current line from the current cursor position. If a select range exists,
- * deletion goes the end of the selection.
- *
- * If the select is greater than one line, it presents a notification
- * requester.
- *
- */
-
- options results
-
- get cursor position
-
- if (result ~= SELECT) then do
- parse var result xend' 'yend
- end
- else do
- get select position
- parse var result xstart' 'ystart' 'xend' 'yend
- if (ystart ~= yend) then
- if ((xend ~= 0) | ((yend-ystart) > 1)) then do
- notify '"Only 1 selected line allowed for DelToStart script."'
- exit
- end
- end
-
- if (xend ~= 0) then do
- bol
- selectto xend yend
- backspace
- end
-