-
-
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
Expanding the snippet with multicursor is broken #4223
Labels
Comments
+1 |
1 similar comment
+1 |
This behaviour happens on any snippet that uses multicursor, I don't believe it is linked to a particular language as I'm able to recreate it on every language I tried and even on my own custom global snippets. |
J-Fields
pushed a commit
that referenced
this issue
Mar 27, 2020
Fixes multicursor snippets, and adds support for stuff like auto-bracketing and auto-completion on multicursor mode. Backspace Support: Makes range represent the selection at position. This way we delete the correct range rather than the primary selection as it was before these changes. Multicursor Character Insert: Makes multicursor text insertion behave like single cursor text insertion by ultimately using the default: type command rather than vscode.TextEditor.insert() which doesn't have support for snippet mode, auto completion, bracketing, etc. To accomplish this, I've added an optional property (isMultiCursor) to InsertTextVSCodeTransformation which represents vimState.isMultiCursorat the time the transformation was created. This property is used to filter the multicursor transformations into multicursorTextTransformations. Because the default: type command handles inserting the text into the correct cursor positions there's no need to repeat the transformation multiple times and we can just execute the command once, as long as we know all transformations are trying to do the same thing. Fixes #4281, fixes #4223, fixes #3005, fixes #4522, fixes #4515, fixes #1946, fixes #3976
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I am using the VSCodeVim/Vim plugin with the C/C++ plugin by Microsoft. When I enter
for<tab>
, the plugin expands the for-loop snippet. The behavior of modifying the iterating variable for this snippet seems to be broken. When I typej
to replacei
, the iterating variable becomesij
instead ofj
. I also could not delete the text properly.To Reproduce
for<tab>
<tab>
to select the iteration variablei
Expected behavior
As I mentioned in the Describe the bug section.
Also, I verified that this behavior did not happen when I disable the Vim plugin.
Screenshots
As I mentioned in the Describe the bug section.
Environment (please complete the following information):
Additional context
None.
The text was updated successfully, but these errors were encountered: