File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1106,10 +1106,7 @@ namespace ts.formatting {
11061106 * Trimming will be done for lines after the previous range
11071107 */
11081108 function trimTrailingWhitespacesForRemainingRange ( ) {
1109- if ( ! previousRange ) {
1110- return ;
1111- }
1112- const startPosition = previousRange . end ;
1109+ const startPosition = previousRange ? previousRange . end : originalRange . pos ;
11131110
11141111 const startLine = sourceFile . getLineAndCharacterOfPosition ( startPosition ) . line ;
11151112 const endLine = sourceFile . getLineAndCharacterOfPosition ( originalRange . end ) . line ;
Original file line number Diff line number Diff line change 1+ /// <reference path="fourslash.ts" />
2+ ////function foo()
3+ ////{
4+ //// var bar;
5+ //// /*1*/
6+ //// }
7+ goTo . marker ( '1' )
8+ edit . insertLine ( "" ) ;
9+ verify . currentFileContentIs ( `function foo()
10+ {
11+ var bar;
12+
13+
14+ }` ) ;
You can’t perform that action at this time.
0 commit comments