home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
viscobv7.zip
/
vac22os2
/
ibmcobol
/
macros
/
zoom.lx
< prev
Wrap
Text File
|
1998-02-24
|
1KB
|
37 lines
/* Zoom in on all lines which contain the text which is highlighted */
/* on the current line. */
doagain = 1
tryagain:
extract 'content' /* get the current line */
extract 'blockstart' /* find start position of block highlight */
extract 'blockend' /* find end position of block hightlight */
/* try to ensure we have some text highlighted. */
if (blockstart = 0 | blockend = 0 | blockend < blockstart) then do
if (doagain = 1) then do
/* no selected text, so get current word */
'block mark word'
doagain = 0
signal tryagain
end
else do
/* error of some sort */
msg 'No block selected or error selecting word under the cursor'
exit 2
end
end
'extract blocktype'
if blocktype = 'STREAM' then
blockend = blockend - 1
/* retrieve the highlighted text only, from the line. */
text = substr(content, blockstart, blockend - blockstart + 1)
'all find any 'text /* show only the lines containing the text */
exit 0