File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1671,6 +1671,7 @@ namespace ts {
1671
1671
if ( startsWith ( change , name ) ) return 0 ;
1672
1672
// Add a " " to avoid references inside words
1673
1673
let idx = change . indexOf ( " " + name ) ;
1674
+ if ( idx === - 1 ) idx = change . indexOf ( '.' + name ) ;
1674
1675
if ( idx === - 1 ) idx = change . indexOf ( '"' + name ) ;
1675
1676
return idx === - 1 ? - 1 : idx + 1 ;
1676
1677
}
Original file line number Diff line number Diff line change 1
1
/// <reference path='fourslash.ts' />
2
2
3
- ////// newFunction
3
+ ////const newFunction = 0;
4
4
/////*start*/1 + 1/*end*/;
5
5
6
6
goTo . select ( 'start' , 'end' )
@@ -9,7 +9,7 @@ edit.applyRefactor({
9
9
actionName : "function_scope_0" ,
10
10
actionDescription : "Extract to function in global scope" ,
11
11
newContent :
12
- `// newFunction
12
+ `const newFunction = 0;
13
13
/*RENAME*/newFunction_1();
14
14
15
15
function newFunction_1() {
You can’t perform that action at this time.
0 commit comments