-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Copy after vi' is incorrect (last character missing) #1533
Comments
confirmed on: In view mode on double click the selection missing the last char. (in insert mode this is not happening) |
Just wondering, are you guys setting vim.useCtrlKeys: true? |
yes, otherwise, how do I copy to the system clipboard? Maybe there is a way to do it, but I don't know how @Chillee |
I think it's definitely a bug (that I've run into a bunch as well), but I'm just trying to track it down. |
Ok, so I think I found part of the issue. https://github.com/VSCodeVim/Vim/blob/master/src/mode/modeHandler.ts#L765 That should capture the default ctrl+c and replace it with our "", which handles all those cases. However, when useCtrlKeys is false, it doesn't get to this code. I'll root around a bit more for the issue. However, if you set vim.useCtrlKeys to be true, you can also use cmd+d (for whatever your keyboard is) to copy, and that should give you the correct behavior. |
@Chillee fixed it on master |
i just installed version 0.6.20 and the things getting weird. if a select a word visually the last character is missing, but if i do copy&paste the selection is complete and the character is not missing. i create a gif of the problem to help you to understand: |
This is as designed, |
Let me add the relevant other issue numbers when I get a chance |
why is what happens in his gif "as designed"? That's the #1 issue that makes it hard for me to switch full time to vscode over sublime text right now... in gvim it would not do that and it's really problematic. Is there no way to fix it? Just trying to understand why this is closed as fixed when that issue still exists -- it's not a minor inconvenience, it's a constant pain making me feel like I need to disable vim mode. I appreciate that you guys are doing this! Just trying to understand. |
@taxilian Not so much designed as a limitation with the VSCode api (and our design choices). This class of issues: https://github.com/VSCodeVim/Vim/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Fselection-off-by-one is the type of problems that you're talking about. |
Thanks for the explanation, Chillee, and also for a link to some other issues with more specific relevant info. I'll throw in my $0.02 in those =] |
Thanks, sorry I was brief via mobile :) |
The VSCodeVim team prioritizes issues based on reaction count.
Tried to copy text using ctrl+c after selecting a string between quotes.
s = "hello, world"
Position cursor anywhere between quotes. Press
vi"
. Then pressctrl+c
What did you expect to happen?
hello, world
in the clipboard`What happened instead?
hello, worl
in the clipboardTechnical details:
The text was updated successfully, but these errors were encountered: