mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Make pasting canceling ongoing geterr requests (#216089)
Should speed up pasting
This commit is contained in:
parent
8939d4f467
commit
d662a014f4
1 changed files with 2 additions and 2 deletions
|
@ -99,13 +99,13 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
|
|||
return;
|
||||
}
|
||||
|
||||
const response = await this._client.execute('getPasteEdits', {
|
||||
const response = await this._client.interruptGetErr(() => this._client.execute('getPasteEdits', {
|
||||
file,
|
||||
// TODO: only supports a single paste for now
|
||||
pastedText: [text],
|
||||
pasteLocations: ranges.map(typeConverters.Range.toTextSpan),
|
||||
copiedFrom
|
||||
}, token);
|
||||
}, token));
|
||||
if (response.type !== 'response' || !response.body || token.isCancellationRequested) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue