File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,10 @@ module ts {
121
121
}
122
122
123
123
return ~ low ;
124
+ }
125
+
126
+ export function integerDivide ( numerator : number , denominator : number ) : number {
127
+ return ( numerator / denominator ) >> 0 ;
124
128
}
125
129
126
130
var hasOwnProperty = Object . prototype . hasOwnProperty ;
Original file line number Diff line number Diff line change @@ -487,7 +487,7 @@ module ts.SignatureHelp {
487
487
// the applicable span and that we are typing the last argument
488
488
// Alternatively, we could be in range of one of the arguments, in which case we need to divide
489
489
// by 2 to exclude commas
490
- var argumentIndex = indexOfNodeContainingPosition < 0 ? argumentCount - 1 : indexOfNodeContainingPosition / 2 ;
490
+ var argumentIndex = indexOfNodeContainingPosition < 0 ? argumentCount - 1 : integerDivide ( indexOfNodeContainingPosition , 2 ) ;
491
491
return new SignatureHelpState ( argumentIndex , argumentCount ) ;
492
492
}
493
493
You can’t perform that action at this time.
0 commit comments