Bug: Replacing line-breaks in selected text with RegExp

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
User avatar
trids
Posts: 69
Joined: Wed May 07, 2003 10:16 am
Location: South Africa

Bug: Replacing line-breaks in selected text with RegExp

Post by trids »

Using TextPad 4.6.2 / NT4

Select a few lines and start the Search & Replace dialog. Check Selected text on, and Regular expression too.

Find what = \n
Replace with = <a single space>

Click Replace All .. you end up with all the lines concatenated ok, but the problem is that only the text from the first of the original lines remains selected.

This causes havoc in macros that want to transform selected text with multiple executions of regular expression replacements. Instead, all the text should remain selected (please) .. just as it does when performing multiple replacements on selected text without removing line-breaks.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

I'm using 4.7.2 on XP and it work's fine, the line breaks are replaced
and the selection holds.
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
helios
Posts: 711
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

Post by helios »

The selection problem will occur if the last line selected isn't terminated. The work around is to terminate the line, and then select to the beginning of the following line.

We will fix this in the next maintenance release.
Helios Software Solutions
User avatar
trids
Posts: 69
Joined: Wed May 07, 2003 10:16 am
Location: South Africa

Post by trids »

Thanks for the prompt and helpful response, Stephen! While trying the workaround, I noticed something else that might be useful:

When I select lines from the margin (which also appears to include all the terminators) .. I get the problem. I guess you might call this line-select mode, where the cursor is a left-handed arrow.

It's only when painting in character-select mode that the workaround works: ie, when the cursor is the I-bar.

HTH
Post Reply