microsoft / microsoft/vscode

"Reindent Lines" doesn't work correctly with square brackets

Open
#333,062 1 comment 0 reactions 1 assignee Claimed by @aiday-mar View on GitHub
bug editor-autoindent
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

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

- VS Code Version: Reproduced in 1.135.0 and 1.136.0-insider
- OS Version: Linux Mint 22.3 - Xfce 64-bit

Steps to Reproduce:

Go to Command Palette -> Reindent Lines on a Rust file that looks like this:
```
fn test() {
let x = vec![
1,
2
];

let y = foo(vec![
1,
2
]);

let z = 3;
}
```

Result:
```
fn test() {
let x = vec![
1,
2
];

let y = foo(vec![
1,
2
]);

let z = 3;
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.