Skip to content

Commit 09f666b

Browse files
committed
Auto merge of rust-lang#15227 - DropDemBits:indent-on-blank-line, r=lnicola
fix: Indent after pressing enter on a blank line Regressed after rust-lang/rust-analyzer#13975 (whoops).
2 parents 927f941 + ebaf8c8 commit 09f666b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

editors/code/src/config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ export class Config {
9999
let onEnterRules: vscode.OnEnterRule[] = [
100100
{
101101
// Carry indentation from the previous line
102-
beforeText: /^\s*$/,
102+
// if it's only whitespace
103+
beforeText: /^\s+$/,
103104
action: { indentAction: vscode.IndentAction.None },
104105
},
105106
{

0 commit comments

Comments
 (0)