CR line terminators are pasting as CRLF
Jason Bolstad last edited by
This might be a bug, but if I create a text file in Notepad++, then do a replace of all the CRLF line terminators with CR I end up with a file that looks like
If I then copy this text and paste it back into the same document I get
The text in the clipboard seems to be just the <CR>, so why when I paste it back do I get <CR><LF>?
Scott Sumner last edited by
There’s something in the Paste mechanism that examines the line-ending setting for the current file–see the status bar area where it says “Windows (CR LF)” or “Unix (LF)”–and converts anything that looks like a line-ending to THAT format at the time of the pasting.
gstavi last edited by
As far as I am concerned this is the desired behavior.
Line ending style is a property of a file. A file should never have mixed different line endings.
Copying text (code segments) between files with different endings is common and the fact that Notepad++ converts the line endings according to the destination file style is good.
dail last edited by
I do agree this is usually the desired behavior. I often copy/paste from various sources and would hate to have all the line endings mixed up.
That said, there is a way to turn it off. You’d need to install a plugin such as LuaScript or PythonScript so that you can call SCI_SETPASTECONVERTENDINGS and set it to