Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't recognize multiline yanks from outside vim #80

Open
somini opened this issue Mar 6, 2016 · 3 comments
Open

Can't recognize multiline yanks from outside vim #80

somini opened this issue Mar 6, 2016 · 3 comments

Comments

@somini
Copy link
Contributor

somini commented Mar 6, 2016

If you copy some multiline text from outside vim (I examined the register and there's ^M there, just like), when you paste it on vim it doesn't detect it as multiline and it pastes it inline. This never happens for text copied inside vim.
This doesn't happen on all text copied from a browser, it seems to be an issue only with text with no "real" newlines. If I copy from this textarea, it works OK. But when I submit the issue and copy from the resulting HTML, the issue appears again.

I've added some echom to the Paste function, and it does detect the text as multiline, so I don't understand where else it could be corrupting the text.
I also tested on a minimal vimrc, so it's not a plugin conflict either.
My workaround is o<C-v><Esc>, which is kinda silly, but shows that the Insert-mode paste works.

@somini
Copy link
Contributor Author

somini commented Mar 6, 2016

After some more poking around, the issue is the text not having a newline in the end. When it does, it works as intended.
Vanilla vim has the same issue, it's not exactly a EasyClip issue.
What I'd like is a way to force multiline paste. It could be as easy as putting a newline in the end of the yank for multiline yanks, since the detection works fine.

You can reproduce this easily:

let @+ = "\nsome text"

This has no newline on the end, so it pastes inline

let @+ = "\nsome text\n"

This has newline on the end, so it pastes correctly.

@svermeulen
Copy link
Owner

What platform is this? I'm not seeing this issue on windows with gvim

@somini
Copy link
Contributor Author

somini commented Mar 6, 2016

I'm on Linux Mint 17.3.

Vim 7.4.52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants