Page 1 of 1

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

Posted: Mon Jun 03, 2024 10:36 am
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.

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

Posted: Mon Jun 03, 2024 10:42 am
by kikosoft2
Here you can see the settings I use in the "Find my files..." request:

Image

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

Posted: Mon Jun 03, 2024 1:49 pm
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.

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

Posted: Mon Jun 03, 2024 3:38 pm
by bbadmin
ben_josephs' analysis of this issue is correct. It will be fixed in the next release. Thanks for reporting it.

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

Posted: Fri Jun 07, 2024 8:45 am
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.