Replacing with a newline ignores Selected Text setting. Bug?

General questions about using TextPad

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

Post Reply
User avatar
A bit iffy
Posts: 15
Joined: Thu Sep 16, 2004 1:15 pm
Location: Brighton, England

Replacing with a newline ignores Selected Text setting. Bug?

Post by A bit iffy »

I wanted to put a newline after each comma within just the first pair of parentheses of the following:

Code: Select all

INSERT INTO SourceDocumentClauses (SourceClauseId, SourceDocumentId, SourceClauseReference, SourceClauseDescription, SourceClauseText, FunctionalGroupId, AssociatedTwiClause, SortNumber, CreatedTimestamp, CreatedBy, LastModifiedTimestamp, LastModifiedBy) VALUES (76, 1, 'xdf435w', 'dsrgs5', 'stuff', , 'U', '1.444', '19/06/2007 11:52:43', 'Supervisor', '19/06/2007 11:52:43', 'Supervisor')
Thus I selected the text within just the first pair of parentheses, and in the Replace dialog I put , into the "Find what" field, ,\n into the "Replace with", chose Regular expression and Selected text and clicked Replace All.

What I expected was the following:

Code: Select all

INSERT INTO SourceDocumentClauses (SourceClauseId,
 SourceDocumentId,
 SourceClauseReference,
 SourceClauseDescription,
 SourceClauseText,
 FunctionalGroupId,
 AssociatedTwiClause,
 SortNumber,
 CreatedTimestamp,
 CreatedBy,
 LastModifiedTimestamp,
 LastModifiedBy) VALUES (76, 1, 'xdf435w', 'dsrgs5', 'stuff', , 'U', '1.444', '19/06/2007 11:52:43', 'Supervisor', '19/06/2007 11:52:43', 'Supervisor')
However, what I actually got was this:

Code: Select all

INSERT INTO SourceDocumentClauses (SourceClauseId,
 SourceDocumentId,
 SourceClauseReference,
 SourceClauseDescription,
 SourceClauseText,
 FunctionalGroupId,
 AssociatedTwiClause,
 SortNumber,
 CreatedTimestamp,
 CreatedBy,
 LastModifiedTimestamp,
 LastModifiedBy) VALUES (76,
 1,
 'xdf435w',
 'dsrgs5',
 'stuff',
 ,
 'U',
 '1.444',
 '19/06/2007 11:52:43',
 'Supervisor',
 '19/06/2007 11:52:43',
 'Supervisor')
So it seems that if you have a newline in the "Replace with", the "Selected text" option is ignored. Is this a bug?

I'm using 5.0.3 on Win2K (SP4).
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Agreed, approximately. It seems to extend the selection to the end of the line. Looks like a bug to me.
User avatar
bbadmin
Site Admin
Posts: 877
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

Confirmed as a bug. Thanks for reporting it.
Post Reply