vim-tmux-clipboard icon indicating copy to clipboard operation
vim-tmux-clipboard copied to clipboard

Initial line feed being trimmed during paste in neovim

Open erahhal opened this issue 7 years ago • 3 comments

Not sure whether tmux or neovim behavior changed, but one of them broke vim-tmux-clipboard when they were updated. When doing a multiple line selection then pasting, it will paste into the current line rather than the next line. I fixed it by changing the "autocmd TextYankPost" line to add another "\n" as the first parameter of the "join" call.

erahhal avatar Jun 27 '17 17:06 erahhal

Unfortunately, tmux buffers (tmux list-buffer) cannot distinguish between characterwise text and linewise text (:help getregtype())

I don't know how to fix this behavior.

roxma avatar Jun 28 '17 01:06 roxma

For what it's worth, this behavior currently breaks entirely inside neovim as well, with no tmux involved - simply doing yy on a line and then p pastes without the linefeed.

Looking at the code, I don't understand why that would be. If I figure it out, I'll send a PR.

dgfitch avatar Feb 27 '19 20:02 dgfitch

The fix suggested by @erahhal works for me.

rvega avatar Jan 04 '20 16:01 rvega