Skip to content

Commit

Permalink
Fix explorer paste (#200601)
Browse files Browse the repository at this point in the history
Fix paste
  • Loading branch information
lramos15 authored Dec 12, 2023
1 parent d5d1424 commit 72cb92f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/vs/workbench/contrib/files/browser/explorerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,6 @@ export class ExplorerService implements IExplorerService {
const previouslyCutItems = this.cutItems;
this.cutItems = cut ? items : undefined;
await this.clipboardService.writeResources(items.map(s => s.resource));
if (items.length === 1) {
await this.clipboardService.writeText(items[0].name);
}

this.view?.itemsCopied(items, cut, previouslyCutItems);
}
Expand Down
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/files/browser/views/explorerView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ export class ExplorerView extends ViewPane implements IExplorerView {
if (!this.hasFocus() || this.readonlyContext.get()) {
return;
}

await this.commandService.executeCommand('filesExplorer.paste', event.clipboardData?.files);
if (event.clipboardData?.files?.length) {
await this.commandService.executeCommand('filesExplorer.paste', event.clipboardData?.files);
}
}));
}

Expand Down

0 comments on commit 72cb92f

Please sign in to comment.