@@ -36,11 +36,11 @@ export class RefactorProxy extends vscode.Disposable {
3636 this . _process = null ;
3737 }
3838 extractVariable < T > ( document : vscode . TextDocument , name : string , filePath : string , range : vscode . Range ) : Promise < T > {
39- let command = { "lookup" :"extract_variable" , "file" :`" ${ filePath } "` , "start" :document . offsetAt ( range . start ) . toString ( ) , "end" :document . offsetAt ( range . end ) . toString ( ) , "id" :"1" , "name" :`" ${ name } "` } ;
39+ let command = { "lookup" :"extract_variable" , "file" :filePath , "start" :document . offsetAt ( range . start ) . toString ( ) , "end" :document . offsetAt ( range . end ) . toString ( ) , "id" :"1" , "name" :name } ;
4040 return this . sendCommand < T > ( JSON . stringify ( command ) , REFACTOR . ExtractVariable ) ;
4141 }
4242 extractMethod < T > ( document : vscode . TextDocument , name : string , filePath : string , range : vscode . Range ) : Promise < T > {
43- let command = { "lookup" :"extract_method" , "file" :`" ${ filePath } "` , "start" :document . offsetAt ( range . start ) . toString ( ) , "end" :document . offsetAt ( range . end ) . toString ( ) , "id" :"1" , "name" :`" ${ name } "` } ;
43+ let command = { "lookup" :"extract_method" , "file" :filePath , "start" :document . offsetAt ( range . start ) . toString ( ) , "end" :document . offsetAt ( range . end ) . toString ( ) , "id" :"1" , "name" :name } ;
4444 return this . sendCommand < T > ( JSON . stringify ( command ) , REFACTOR . ExtractVariable ) ;
4545 }
4646 private sendCommand < T > ( command : string , telemetryEvent : string ) : Promise < T > {
@@ -94,7 +94,7 @@ export class RefactorProxy extends vscode.Disposable {
9494
9595 let lengthOfHeader = dataStr . indexOf ( ':' ) + 1 ;
9696 let lengthOfMessage = parseInt ( dataStr . substring ( ERROR_PREFIX . length , lengthOfHeader - 1 ) ) ;
97- if ( dataStr . length == = lengthOfMessage + lengthOfHeader ) {
97+ if ( dataStr . length > = lengthOfMessage + lengthOfHeader ) {
9898 this . _previousStdErrData = '' ;
9999 this . dispose ( ) ;
100100
0 commit comments