Skip to content

Commit 89230a1

Browse files
committed
Merge branch 'main' into joh/swc
2 parents c3efc26 + 6a58b40 commit 89230a1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/vs/workbench/browser/dnd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function extractTreeDropData(dataTransfer: VSDataTransfer): Promise
6060
if (dataTransfer.has(resourcesKey)) {
6161
try {
6262
const asString = await dataTransfer.get(resourcesKey)?.asString();
63-
const rawResourcesData = JSON.stringify(asString?.split('\\n').filter(value => !value.startsWith('#')));
63+
const rawResourcesData = JSON.stringify(asString?.split('\n').filter(value => !value.startsWith('#')));
6464
editors.push(...createDraggedEditorInputFromRawResourcesData(rawResourcesData));
6565
} catch (error) {
6666
// Invalid transfer

src/vs/workbench/browser/parts/views/treeView.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,10 @@ abstract class AbstractTreeView extends Disposable implements ITreeView {
826826
const isTreeEmpty = !this.root.children || this.root.children.length === 0;
827827
// Hide tree container only when there is a message and tree is empty and not refreshing
828828
if (this._messageValue && isTreeEmpty && !this.refreshing) {
829-
this.treeContainer.classList.add('hide');
829+
// If there's a dnd controller then hiding the tree prevents it from being dragged into.
830+
if (!this.dragAndDropController) {
831+
this.treeContainer.classList.add('hide');
832+
}
830833
this.domNode.setAttribute('tabindex', '0');
831834
} else {
832835
this.treeContainer.classList.remove('hide');

0 commit comments

Comments
 (0)