Closed daagaak closed 1 year ago
I have tested nvim v0.6.1. The Trailing newlines are not dropped.
function! s:on_stdout(job_id, data, event)
let @" = join(a:data, "\n")
+ let g:my_data = a:data
endfunction
echo -n $'aaa\nbbbb\n\n' | tmux loadb -
nvim
:echo g:my_data
. nvim outputs ['aaa', 'bbbb', '', '']
Agreed, my test shows the same as yours. I wonder what's wrong then. If I do the following:
the quick brown
fox jumped
over the lazy dog
d
of jumped
.yyp
The yanked line pastes inline, as if the trailing \n
has been dropped (so I get fox jumpedfox jumped
). If I disable vim-tmux-clipboard
then the paste does a line-wise paste as I expected.
I'm also experiencing this issue. If I remove this plugin my yanking works as usual.
I haven't been using vim extensively for a while but I don't remember this ever being an issue.
Just wanted to add an update.
Yanking with new lines work perfectly by checking out commit f7dd0381533c2e15d83e7566e2690f540b8927e2
of this plugin. 😄
Please test the latest commit e1be6608410c260479dc4807ad8c103faf5460d8
That one works for me. 😄
Thanks for this project and for a quick fix. Great job! 💯
It looks like the changes in #19 end up stripping the trailing newline that's yanked when doing line-wise yanks. This means that pasting those lines that inserts inline, instead of line-wise.
I think this is because the diffs in #19 are
join()
ing the buffer, meaning that the last entry will not have a\n
added to it.