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
paste setup sometimes fails to "set nopaste" #7994
Comments
This is a known issue (yes, it's quite bothersome). Workaround is to
after pasting. (Edit: or do it automatically in a |
Sorry, which issue is known? What about |
|
Oh got it, this one was driving me crazy, thanks! |
What is the reason for this behavior? I also sometimes see this. |
For those suffering from this, a workaround is to
(I won't use this workaround myself, else I might forget about the issue :) |
Update: See my answer at https://stackoverflow.com/questions/53123297/disable-insert-paste-mode/53285805#53285805 TL/DR:
Related discussion: |
I'm having a version of this problem, where if I use the terminal emulator's paste-from-clipboard short key (Ctrl-Shift-V for me) when in the command line in neovim, it'll then put me in -- INSERT (paste) -- mode and keep me in it until I manually |
<Paste> is a 3-byte sequence and the beginning one or two bytes can appear at the very end of the typeahead buffer. When this happens, we were exiting from `vgetorpeek()` instead of reading more characters to see the complete sequence. I think this should fix neovim#7994 -- at least partially. Before this change, when I paste exactly 64 characters into a freshly booted instance, I get what I pasted plus the literal text "<Paste>" at the end. Nvim also stays in nopaste mode. The attached test case fails in this manner without the code change. Fix neovim#7994
<Paste> is a 3-byte sequence and the beginning one or two bytes can appear at the very end of the typeahead buffer. When this happens, we were exiting from `vgetorpeek()` instead of reading more characters to see the complete sequence. I think this should fix #7994 -- at least partially. Before this change, when I paste exactly 64 characters into a freshly booted instance, I get what I pasted plus the literal text "<Paste>" at the end. Nvim also stays in nopaste mode. The attached test case fails in this manner without the code change. Fix #7994
nvim --version
:$TERM
: screen-256colorSteps to reproduce using
nvim -u NORC
Can't reproduce yet, it works without the config file.
Actual behaviour
I was reporting this before but the issue was renamed #6561
Finally caught it in the wild. Here is what I did:
Cmd-Shift-V
,Enter
Result:
<Paste>
at the end.:verb set et?
→noexpandtab
Expected behaviour
expandtab
should stay on.<Paste>
The text was updated successfully, but these errors were encountered: