On windows, using neovim, with
clipboard=unnamedplus , when I paste from the system clipboard using
:put , it will always paste in a newline , even if the content of the clipboard has no newline. (This issue happens in windows terminal and powershell or when using neovide as a gui app)
If I copy the content of my clipboard to notepad , it will just paste everything on the same line , so clearly there isn't a newline character inside my clipboard, but in nvim , it creates a new line and then pastes the content of the clipboard on that new line.
If I disable
clipboard=unnamedplus , I get the behaviour I want when pasting something I yanked from inside neovim, but when I try pasting something from the system clipboard using
"+p , it still gets pasted on a newline , even if there are no new line characters in my clipboard.
What am I missing? What I want is for pasting from the system clipboard to behave the same as if it was yanked from inside vim.
I've seen this question which is somewhat similar Inline paste from System Clipboard and the suggestion is to use a different mapping that trims the clipboard but I don't want a new mapping I just want to press
p and not have some new line added to the clipboard that doesn't exist otherwise. If it's not possible I'd like to at least understand why neovim adds a new line here.