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

[p and ]p don't account for NUL bytes #117

Open
hardenedapple opened this issue Nov 15, 2016 · 0 comments
Open

[p and ]p don't account for NUL bytes #117

hardenedapple opened this issue Nov 15, 2016 · 0 comments

Comments

@hardenedapple
Copy link

This is more to mention it rather than ask for it to be fixed.

The s:putline() function that implements the [p and ]p mappings uses getreg() with only one argument.
This means that it receives text encoded with :help NL-used-for-Nul, and can't distinguish between NUL bytes and newlines.
After this the setreg() calls set the register contents to this encoded text, leaving the contents of the register changed.

I use NULL bytes infrequently enough that this isn't much of a bother to me, and suspect the same of others. I'm mentioning it so the information is stored somewhere.

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

1 participant