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

Multicursor Enter issue with indentation (gif attached) #111128

Closed
stagefright5 opened this issue Nov 22, 2020 · 7 comments · Fixed by #111897
Closed

Multicursor Enter issue with indentation (gif attached) #111128

stagefright5 opened this issue Nov 22, 2020 · 7 comments · Fixed by #111897
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-multicursor Editor multiple cursor issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@stagefright5
Copy link

stagefright5 commented Nov 22, 2020

  • VSCode Version: 1.51.1 / 1.52.0-insider
  • OS Version: Ubuntu 20.04 / Windows 10

Steps to Reproduce:

  1. insert 4x spaces at the beginning of a line
  2. place multiple cursors on that line
  3. Press enter

Expected: Insert newline at each of the positions where cursor is present
Actual Behavior: Inserts newline only at the first (NOT the left most) cursor position

(Let me know the relevant settings values required)

Addiditional info:

  • I use tabs (width of 4 spaces) for indentation for formatting

vscode-multicursor-bug

Does this issue occur when all extensions are disabled?: Yes

@alexdima
Copy link
Member

alexdima commented Dec 3, 2020

@stagefright5 I think this might be caused by one of your installed extensions. Here it is on my machine:

TO_UPLOAD

To validate this, could you please try the following:

  • Run the command Developer: Toggle Keyboard Shortcuts Troubleshooting
    • This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.
  • You can then press Enter and check what command is invoked.

If you are having trouble understanding the output, please feel free to paste here and I can help decipher it for you.

@alexdima alexdima added the info-needed Issue requires more information from poster label Dec 3, 2020
@stagefright5
Copy link
Author

stagefright5 commented Dec 4, 2020

Here is the renderer keyboard troubleshoot log:

renderer4.log

Also, the settings.json:

settings.zip

I have disabled all the extensions. And, now, I can reproduce this with the latest stable too and in Ubuntu.

@stagefright5
Copy link
Author

It is also not exclusive to the multi cursors created using keybinding. I can reproduce this by placing mulitple cursors created using the Alt + Mouse-Left-Click too.

@alexdima
Copy link
Member

alexdima commented Dec 4, 2020

@stagefright5 From the keyboard log, I can confirm that nobody is "stealing" Enter via keybindings. But there is another way that extensions can intercept that, via our type command. That is the way in which vim intercepts Enter.
Does this reproduce when disabling all extensions? Press F1 and then choose Developer: Reload Window with Extensions Disabled

Kapture 2020-07-20 at 15 28 23

@stagefright5
Copy link
Author

Hey @alexdima , In all of my previuos posts I have made sure that I have disabled all the extensions (by running the command that you have mentioned) and also, at the end of each of my posts I have explicitly stated that I had disabled the extensions.
Can it have anything to do with my settings related to tabs?
May be, inspect my settings here: settings.zip (which has settings.json) and, try to reproduce the issue by applying the exact same settings (copy paste my settings.json).

@stagefright5
Copy link
Author

Also, @alexdima , Please carefully go through each of the above posts. It seems like you are not reading all the comments. It will save me from repeating the same thing again and again.
Thanks.

@alexdima
Copy link
Member

alexdima commented Dec 4, 2020

Thank you for your patience, with your settings, I could finally reproduce. I missed the fact that the editor is configured to use tabs and I believed you might be using vim due to the block cursor in the GIF.

You can workaround by using "editor.autoIndent": "advanced".

@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug editor-multicursor Editor multiple cursor issues and removed info-needed Issue requires more information from poster labels Dec 4, 2020
@alexdima alexdima added this to the December/January 2021 milestone Dec 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2021
@rzhao271 rzhao271 added the verified Verification succeeded label Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-multicursor Editor multiple cursor issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@alexdima @rzhao271 @stagefright5 and others