home *** CD-ROM | disk | FTP | other *** search
- ; Repeat the previous Locate, but in the reverse direction.
- ; E.g., if you search for a string that you know exists, but
- ; it's not found before the end of the file, press Ctrl+minus
- ; to repeat the search for the same string looking from the
- ; cursor position to the beginning of the file.
-
- ; by Larry Margolis
-
- def c_minus =
- getsearch oldsearch
- parse value oldsearch with . c_or_l search
- delim = leftstr(search,1)
- newsearch = oldsearch
- if lastpos(delim,search)=1 then
- newsearch=newsearch || delim
- endif
- newsearch=newsearch'-'
- setsearch newsearch
- repeatfind
- setsearch oldsearch
-