Problem with search & replac on selected text

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Thad Smith
Posts: 7
Joined: Tue Dec 28, 2004 1:04 am

Problem with search & replac on selected text

Post by Thad Smith »

I am running TP 4.7.2. If I select a block of text, open Seach and Replace window, enter Find and Replace strings, then select Scope:Selected text, the Find Next button is greyed out. It should be active, allowing me to find the first occurrance in the selected text.

Thad
dougwong55
Posts: 13
Joined: Tue Feb 15, 2005 1:00 am

Post by dougwong55 »

I believe this is the expected, though annoying, behavior. If you do not have any text selected and perform a Search and Replace, TextPad highlights the found text. This allows you to confirm each replacement individually. When there is a selection, the selected text is highlighted and there is no way to distiguish between the found text and the selected text. I would think a solution would be to have two different highlighting colors, one for the selection and the other for the found text.
Lostgallifreyan
Posts: 25
Joined: Mon Feb 14, 2005 10:51 am

Post by Lostgallifreyan »

There's an easy and very fast way round this one.

Select lines.
While holding Ctrl, press C N V Home.
Press F8, do the manual search/replace you want, then press Esc to close the dialog.
While holding Ctrl, press A C Tab V.

If you do this a lot you might want to close temporary documents to avoid growing clutter.
It's almost as easy with block select (Alt and drag to select), but remember to select the same way before pasting back.

This has the advantage that you can't accidentally change stuff elsewhere in the main file (as might happen if the selection got disturbed), in fact nothing gets changed till the edited transplant is complete and pasted back.
Thad Smith
Posts: 7
Joined: Tue Dec 28, 2004 1:04 am

Post by Thad Smith »

Lostgallifreyan wrote:There's an easy and very fast way round this one.

Select lines.
While holding Ctrl, press C N V Home.
Press F8, do the manual search/replace you want, then press Esc to close the dialog.
While holding Ctrl, press A C Tab V.
Thanks, Mr. Lostfallifreyan!
My previous editor was TSE (ne Semware QEDit), which allows selective replacement within a block. The block gives insurance against changing elesewhere, as you note. It would be nice, though, to have this feature built in.

Thad
Post Reply