Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(37030): Expand Selection in function and arrow function skips bod…
…y block (#50711) * fix(37030): include curly braces from function body in the selection * add missed sourceFile argument
- Loading branch information
1 parent
e2dd508
commit 4d91204
Showing
10 changed files
with
117 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/smartSelection_function1.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const f1 = () => { | ||
/**/ | ||
}; | ||
|
||
|
||
{ | ||
|
||
} | ||
|
||
() => { | ||
|
||
} | ||
|
||
const f1 = () => { | ||
|
||
}; |
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/smartSelection_function2.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function f2() { | ||
/**/ | ||
} | ||
|
||
|
||
{ | ||
|
||
} | ||
|
||
function f2() { | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/smartSelection_function3.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const f3 = function () { | ||
/**/ | ||
} | ||
|
||
|
||
{ | ||
|
||
} | ||
|
||
function () { | ||
|
||
} | ||
|
||
const f3 = function () { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
////const f1 = () => { | ||
//// /**/ | ||
////}; | ||
|
||
verify.baselineSmartSelection(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
////function f2() { | ||
//// /**/ | ||
////} | ||
|
||
verify.baselineSmartSelection(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
////const f3 = function () { | ||
//// /**/ | ||
////} | ||
|
||
verify.baselineSmartSelection(); |