Skip to content

Commit 516bb5f

Browse files
committed
prevent scm from moving on startup
1 parent 3b32fb1 commit 516bb5f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

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
@@ -917,7 +917,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
917917
const container = this.viewDescriptorService.getViewContainerById(dropData.id)!;
918918
const viewsToMove = this.viewDescriptorService.getViewContainerModel(container).allViewDescriptors;
919919

920-
if (!viewsToMove.some(v => !v.canMoveView)) {
920+
if (!viewsToMove.some(v => !v.canMoveView) && viewsToMove.length > 0) {
921921
overlay = new ViewPaneDropOverlay(parent, undefined, this.viewDescriptorService.getViewContainerLocation(this.viewContainer)!, this.themeService);
922922
}
923923
}
@@ -1357,7 +1357,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
13571357
const container = this.viewDescriptorService.getViewContainerById(dropData.id)!;
13581358
const viewsToMove = this.viewDescriptorService.getViewContainerModel(container).allViewDescriptors;
13591359

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

0 commit comments

Comments
 (0)