Skip to content

Commit 1968b78

Browse files
authored
prevent scm from moving on startup (#99692)
1 parent d53378d commit 1968b78

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/vs/workbench/browser/parts/compositeBar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ export class CompositeDragAndDrop implements ICompositeDragAndDrop {
122122
const draggedViews = this.viewDescriptorService.getViewContainerModel(currentContainer)!.allViewDescriptors;
123123

124124
// ... all views must be movable
125-
return !draggedViews.some(v => !v.canMoveView);
125+
// Prevent moving scm explicitly TODO@joaomoreno remove when scm is moveable
126+
return !draggedViews.some(v => !v.canMoveView) && currentContainer.id !== 'workbench.view.scm';
126127
} else {
127128
// Dragging an individual view
128129
const viewDescriptor = this.viewDescriptorService.getViewDescriptorById(dragData.id);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
913913
const container = this.viewDescriptorService.getViewContainerById(dropData.id)!;
914914
const viewsToMove = this.viewDescriptorService.getViewContainerModel(container).allViewDescriptors;
915915

916-
if (!viewsToMove.some(v => !v.canMoveView)) {
916+
if (!viewsToMove.some(v => !v.canMoveView) && viewsToMove.length > 0) {
917917
overlay = new ViewPaneDropOverlay(parent, undefined, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
918918
}
919919
}
@@ -1353,7 +1353,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
13531353
const container = this.viewDescriptorService.getViewContainerById(dropData.id)!;
13541354
const viewsToMove = this.viewDescriptorService.getViewContainerModel(container).allViewDescriptors;
13551355

1356-
if (!viewsToMove.some(v => !v.canMoveView)) {
1356+
if (!viewsToMove.some(v => !v.canMoveView) && viewsToMove.length > 0) {
13571357
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
13581358
}
13591359
}

0 commit comments

Comments
 (0)