Skip to content

Commit 486f20e

Browse files
authored
Fix explorer paste (microsoft#200643)
Fix explorer paste (microsoft#200601) Fix paste
1 parent c9419b7 commit 486f20e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/vs/workbench/contrib/files/browser/explorerService.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,6 @@ export class ExplorerService implements IExplorerService {
286286
const previouslyCutItems = this.cutItems;
287287
this.cutItems = cut ? items : undefined;
288288
await this.clipboardService.writeResources(items.map(s => s.resource));
289-
if (items.length === 1) {
290-
await this.clipboardService.writeText(items[0].name);
291-
}
292289

293290
this.view?.itemsCopied(items, cut, previouslyCutItems);
294291
}

src/vs/workbench/contrib/files/browser/views/explorerView.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,9 @@ export class ExplorerView extends ViewPane implements IExplorerView {
329329
if (!this.hasFocus() || this.readonlyContext.get()) {
330330
return;
331331
}
332-
333-
await this.commandService.executeCommand('filesExplorer.paste', event.clipboardData?.files);
332+
if (event.clipboardData?.files?.length) {
333+
await this.commandService.executeCommand('filesExplorer.paste', event.clipboardData?.files);
334+
}
334335
}));
335336
}
336337

0 commit comments

Comments
 (0)