Skip to content

When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines) #2938

@amamut

Description

@amamut

Depending on how my cursor arrives at line of code determines which way the editor indents the line. Let me start by showing what the correct indent spacing looks like:
https://gyazo.com/eca50fd7907e95b870c4b1b5602300c3

  1. If I am on a line of code and there is already a space on the line, which is invisible if the line is selected, indents to the first indent spot encountered.
    https://gyazo.com/687cae9a5b229d24fccb8c958cdbc434
  2. If I am on a line of code, lose focus of VS Code, and then come back to VS Code the indent spacing is incorrect and its a combination of tabs and spaces.
    https://gyazo.com/44a5e6d87122dd59559c047cb8b9336d
  3. If you enable to show invisible spaces, they are still not visible on the current line selected. I think it would be useful to be able to see them as well.

It may be useful stating that this weird spacing is occurring while working with typescript. I am not sure if it occurs for any other languages. And please let me know if I am missing a configuration item.

Thanks!

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverification-foundIssue verification failedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions