Bug v9.4.1 Sometimes "\n" is added to pastes in "Find.." and "Find in files...".

General questions about using TextPad

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

Post Reply
User avatar
kikosoft2
Posts: 28
Joined: Sun Apr 08, 2007 12:23 pm

Bug v9.4.1 Sometimes "\n" is added to pastes in "Find.." and "Find in files...".

Post by kikosoft2 »

In Textpad c9.4.1, Windows 11, I can copy and paste with ctrl-c and ctrl-v. This works fine most of the time. However, sometimes this problem occurs:

When I ctrl-v the same content in "Find..." or "Find in Files...", and as far as I can tell only there, I get an added "\n" at the end of the paste.

So if I paste the string "test", as the thing to search for, it becomes "test\n".

I checked the clipboard content in another program and the new line character, or "\n", isn't in the Windows clipboard itself.

Simply restarting Textpad removes this problem. It actually doesn't happen all that often, but enough to be irritating. Regrettably I cannot say what action of mine causes the problem, I simply don't know.

I'm a programmer myself, so I know how this debugging stuff works. If you have any follow-up question, don't hesitate to ask me. My email address can be used for this.

Textpad is still my favorite text editor.
User avatar
kikosoft2
Posts: 28
Joined: Sun Apr 08, 2007 12:23 pm

Re: Bug v9.4.1 Sometimes "\n" is added to pastes in "Find.." and "Find in files...".

Post by kikosoft2 »

Here you can see the settings I use in the "Find my files..." request:

Image
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Re: Bug v9.4.1 Sometimes "\n" is added to pastes in "Find.." and "Find in files...".

Post by ben_josephs »

If block select mode is on, TextPad treats a selection as a sequence of lines, even if it's within a single line, and appends a "\n" to each line in the selection. I believe this behaviour was introduced fairly recently. It's not always what you want, as TextPad will not find a match unless regular expression searching is selected, and then only if the matching text is at the end of a line.

If you just select text within a single line and open the "Find" or "Find In Files" dialog, TextPad does not add a "\n" to the selection.
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug v9.4.1 Sometimes "\n" is added to pastes in "Find.." and "Find in files...".

Post by bbadmin »

ben_josephs' analysis of this issue is correct. It will be fixed in the next release. Thanks for reporting it.
User avatar
kikosoft2
Posts: 28
Joined: Sun Apr 08, 2007 12:23 pm

Re: Bug v9.4.1 Sometimes "\n" is added to pastes in "Find.." and "Find in files...".

Post by kikosoft2 »

Thank you both for your reactions. I never thought of the "Block select mode", but it makes sense. I hope it gets resolved in the next release.
Post Reply