diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index e7665253a05..ad62952a45e 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -49,7 +49,7 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { URI } from 'vs/base/common/uri'; -import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; +import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; export interface IPaneColors extends IColorMapping { @@ -377,10 +377,10 @@ export abstract class ViewPane extends Pane implements IView { private calculateTitle(title: string): string { const viewContainer = this.viewDescriptorService.getViewContainerByViewId(this.id)!; const model = this.viewDescriptorService.getViewContainerModel(viewContainer); - const viewDescriptor = this.viewDescriptorService.getViewDescriptorById(this.id)!; + const viewDescriptor = this.viewDescriptorService.getViewDescriptorById(this.id); const isDefault = this.viewDescriptorService.getDefaultContainerById(this.id) === viewContainer; - if (!isDefault && viewDescriptor.containerTitle && model.title !== viewDescriptor.containerTitle) { + if (!isDefault && viewDescriptor?.containerTitle && model.title !== viewDescriptor.containerTitle) { return `${viewDescriptor.containerTitle}: ${title}`; } @@ -1580,8 +1580,8 @@ registerAction2( id: 'views.moveViewUp', title: nls.localize('viewMoveUp', "Move View Up"), keybinding: { - primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.UpArrow), - weight: KeybindingWeight.WorkbenchContrib + 1, + primary: KeyMod.Shift + KeyMod.Alt + KeyCode.UpArrow, + weight: KeybindingWeight.WorkbenchContrib, when: FocusedViewContext.notEqualsTo('') } }, -1); @@ -1596,8 +1596,8 @@ registerAction2( id: 'views.moveViewLeft', title: nls.localize('viewMoveLeft', "Move View Left"), keybinding: { - primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.LeftArrow), - weight: KeybindingWeight.WorkbenchContrib + 1, + primary: KeyMod.Shift + KeyMod.Alt + KeyCode.LeftArrow, + weight: KeybindingWeight.WorkbenchContrib, when: FocusedViewContext.notEqualsTo('') } }, -1); @@ -1612,8 +1612,8 @@ registerAction2( id: 'views.moveViewDown', title: nls.localize('viewMoveDown', "Move View Down"), keybinding: { - primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.DownArrow), - weight: KeybindingWeight.WorkbenchContrib + 1, + primary: KeyMod.Shift + KeyMod.Alt + KeyCode.DownArrow, + weight: KeybindingWeight.WorkbenchContrib, when: FocusedViewContext.notEqualsTo('') } }, 1); @@ -1628,8 +1628,8 @@ registerAction2( id: 'views.moveViewRight', title: nls.localize('viewMoveRight', "Move View Right"), keybinding: { - primary: KeyChord(KeyMod.CtrlCmd + KeyCode.KEY_K, KeyCode.RightArrow), - weight: KeybindingWeight.WorkbenchContrib + 1, + primary: KeyMod.Shift + KeyMod.Alt + KeyCode.RightArrow, + weight: KeybindingWeight.WorkbenchContrib, when: FocusedViewContext.notEqualsTo('') } }, 1);