mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Disable path renames on TS 3.1
Outcome of #51175. Requires fixes upstream
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
|
||||
import * as path from 'path';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypeScriptServiceClient, ServerResponse } from '../typescriptService';
|
||||
import API from '../utils/api';
|
||||
import * as typeConverters from '../utils/typeConverters';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
|
||||
class TypeScriptRenameProvider implements vscode.RenameProvider {
|
||||
public constructor(
|
||||
@@ -31,6 +34,10 @@ class TypeScriptRenameProvider implements vscode.RenameProvider {
|
||||
return Promise.reject<vscode.Range>(renameInfo.localizedErrorMessage);
|
||||
}
|
||||
|
||||
if (renameInfo.fileToRename && this.client.apiVersion.gte(API.v310) && this.client.apiVersion.lt(API.v320)) {
|
||||
return Promise.reject<vscode.Range>(localize('fileToRename.notSupported', "Renaming paths is not supported in this version of TypeScript"));
|
||||
}
|
||||
|
||||
if (this.client.apiVersion.gte(API.v310)) {
|
||||
const triggerSpan = renameInfo.triggerSpan;
|
||||
if (triggerSpan) {
|
||||
|
||||
Reference in New Issue
Block a user