Search Option: Selection Only (Block)

Click the Block button on the search toolbar to turn on the "selection only" search option to search only through the selected part of the current file.

When you invoke a search command like Find First with this option on, the selection will be turned into the search range. The search range is highlighted in a different color than the selection. You can configure both the "selected text" and "search range" colors in the Colors Preferences.

If a search match is found, that search match will become selected. You can then edit the search match or any part of the file inside or outside the search range. As long as you don't turn off the "selection only" search option, the search range will remain highlighted.

When you invoke the next search command, and there already is a search range, EditPad will either search through the existing search range when no text is selected, or when the selection falls entirely inside the search range. If some of the text outside the search range is selected, EditPad will use the selection as the new search range.

In practice, this mechanism is very intuitive. When you search, EditPad selects the search match, which always falls inside the search range. So you can click Search|Find Next and Search|Find Previous without paying much attention to the search range. It will stay put. When you want to search through a different part of the file, simply select it, make sure "selection only" is on, and search. You don't need to check whether there was a search range already. EditPad will search through the block of text that you selected.

See also

Search|Prepare to Search
Search Options