Skip to content

Commit c123208

Browse files
committed
fixes #2507 - bad formatting for formatonkey if convertTabsToSpaces === false
1 parent 631a9d8 commit c123208

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/session.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,9 @@ module ts.server {
495495
if (lineText.charAt(i) == " ") {
496496
indentPosition--;
497497
}
498+
else if (lineText.charAt(i) == "\t") {
499+
indentPosition -= editorOptions.IndentSize;
500+
}
498501
else {
499502
break;
500503
}

0 commit comments

Comments
 (0)