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

Substitution with special characters does not get copied correctly #5

Open
svermeulen opened this issue Feb 11, 2019 · 1 comment
Open

Comments

@svermeulen
Copy link
Owner

Repro steps:

  1. Enter the following: foo ^G<cr>bar. Should display as foo ^Mbar.
  2. Copy it to clipboard with yy
  3. Paste it with p
  4. Should paste properly as foo ^Mbar
  5. Try it with substitution operation by executing sj (assuming default mapping)
  6. Notice it displays as:
foo
bar
@svermeulen
Copy link
Owner Author

This occurs because it uses the change operation in combination with enabling paste mode to do the substitution. This is nice because it handles edges cases like end of line, end of file, etc. better. But given this problem, we might have to change it to use p instead and then just add special case behaviour for all the edge cases. This problem would be especially bad when doing things like copying the entire contents of the buffer and then replacing another buffer.

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