Skip to content

Commit 62b15de

Browse files
committed
Merge pull request #2687 from dbaeumer/feature/fix2507
fixes #2507 - bad formatting for formatonkey if convertTabsToSpaces === false
2 parents fcc5ac0 + c123208 commit 62b15de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/session.ts

+3
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ module ts.server {
527527
if (lineText.charAt(i) == " ") {
528528
indentPosition--;
529529
}
530+
else if (lineText.charAt(i) == "\t") {
531+
indentPosition -= editorOptions.IndentSize;
532+
}
530533
else {
531534
break;
532535
}

0 commit comments

Comments
 (0)