Skip to content

Commit 16e9205

Browse files
authored
Restore default paste fallback (microsoft#192220)
Fixes microsoft#192196
1 parent f1302be commit 16e9205

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ export class CopyPasteController extends Disposable implements IEditorContributi
283283
return;
284284
}
285285

286+
// If the only edit returned is a text edit, use the default paste handler
287+
if (providerEdits.length === 1 && providerEdits[0].providerId === 'text') {
288+
await this.applyDefaultPasteHandler(dataTransfer, metadata, tokenSource.token);
289+
return;
290+
}
291+
286292
if (providerEdits.length) {
287293
const canShowWidget = editor.getOption(EditorOption.pasteAs).showPasteSelector === 'afterPaste';
288294
return this._postPasteWidgetManager.applyEditAndShowIfNeeded(selections, { activeEditIndex: 0, allEdits: providerEdits }, canShowWidget, tokenSource.token);

0 commit comments

Comments
 (0)