Find and replace is inserting an extra newline


#1

I suspect I have a a miscalibrated setting somewhere but I can’t find any likely candidates.

I am attempting to find all instances of ‘my $host = $row->[2];’ and convert to ‘my $host = $row->[0];’ but replace all is instead giving me

‘my $host = $row->[0];
’ (note the newline at the end of the string)

Because this string appears in comments as well adding newline is pushing unwanted code snippets out of commented lines. Is there a setting somewhere that defines the behavior of replace?

using version 1.0.3 on Windows 7 Enterprise with no community packages.


#2

Could it be that there actually is a newline in the replace field (because you copy-pasted the text, for example)? It’s not very clear when that’s the case, but last time I checked it added a newline when I copy-pasted into the replace field…


#3

to test I created a new file, manually typed ‘teststring1’ hit ctrl-f to bring up find replace menu, manually typed teststring into the find field and stringtest into the replace field, and hit replace. It still inserted a newline. It does not appear to be related to copy/paste.

I’ve included a screencap with show invisible enabled to demonstrate that it is inserting a newline.

*edited to fix image


#4

The update last night to 1.0.4 appears to have fully resolved this issue. Find and Replace is no longer inserting unwanted newlines as of this morning.