提交 60526cb4 编写于 作者: B Benjamin Pasero

rename closeTabsInMRUOrder to focusRecentEditorAfterClose (for #43459)

上级 371c853f
...@@ -30,7 +30,7 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = { ...@@ -30,7 +30,7 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = {
highlightModifiedTabs: false, highlightModifiedTabs: false,
tabCloseButton: 'right', tabCloseButton: 'right',
tabSizing: 'fit', tabSizing: 'fit',
closeTabsInMRUOrder: true, focusRecentEditorAfterClose: true,
showIcons: true, showIcons: true,
enablePreview: true, enablePreview: true,
openPositioning: 'right', openPositioning: 'right',
......
...@@ -58,9 +58,9 @@ configurationRegistry.registerConfiguration({ ...@@ -58,9 +58,9 @@ configurationRegistry.registerConfiguration({
], ],
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs.") 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs.")
}, },
'workbench.editor.closeTabsInMRUOrder': { 'workbench.editor.focusRecentEditorAfterClose': {
'type': 'boolean', 'type': 'boolean',
'description': nls.localize('closeTabsInMRUOrder', "Controls whether tabs are closed in most recently used order or from left to right."), 'description': nls.localize('focusRecentEditorAfterClose', "Controls whether tabs are closed in most recently used order or from left to right."),
'default': true 'default': true
}, },
'workbench.editor.showIcons': { 'workbench.editor.showIcons': {
......
...@@ -941,7 +941,7 @@ export interface IWorkbenchEditorPartConfiguration { ...@@ -941,7 +941,7 @@ export interface IWorkbenchEditorPartConfiguration {
highlightModifiedTabs?: boolean; highlightModifiedTabs?: boolean;
tabCloseButton?: 'left' | 'right' | 'off'; tabCloseButton?: 'left' | 'right' | 'off';
tabSizing?: 'fit' | 'shrink'; tabSizing?: 'fit' | 'shrink';
closeTabsInMRUOrder?: boolean; focusRecentEditorAfterClose?: boolean;
showIcons?: boolean; showIcons?: boolean;
enablePreview?: boolean; enablePreview?: boolean;
enablePreviewFromQuickOpen?: boolean; enablePreviewFromQuickOpen?: boolean;
......
...@@ -98,7 +98,7 @@ export class EditorGroup extends Disposable { ...@@ -98,7 +98,7 @@ export class EditorGroup extends Disposable {
private active: EditorInput | null; // editor in active state private active: EditorInput | null; // editor in active state
private editorOpenPositioning: 'left' | 'right' | 'first' | 'last'; private editorOpenPositioning: 'left' | 'right' | 'first' | 'last';
private closeTabsInMRUOrder: boolean; private focusRecentEditorAfterClose: boolean;
constructor( constructor(
labelOrSerializedGroup: ISerializedEditorGroup, labelOrSerializedGroup: ISerializedEditorGroup,
...@@ -123,7 +123,7 @@ export class EditorGroup extends Disposable { ...@@ -123,7 +123,7 @@ export class EditorGroup extends Disposable {
private onConfigurationUpdated(event?: IConfigurationChangeEvent): void { private onConfigurationUpdated(event?: IConfigurationChangeEvent): void {
this.editorOpenPositioning = this.configurationService.getValue('workbench.editor.openPositioning'); this.editorOpenPositioning = this.configurationService.getValue('workbench.editor.openPositioning');
this.closeTabsInMRUOrder = this.configurationService.getValue('workbench.editor.closeTabsInMRUOrder'); this.focusRecentEditorAfterClose = this.configurationService.getValue('workbench.editor.focusRecentEditorAfterClose');
} }
get id(): GroupIdentifier { get id(): GroupIdentifier {
...@@ -335,7 +335,7 @@ export class EditorGroup extends Disposable { ...@@ -335,7 +335,7 @@ export class EditorGroup extends Disposable {
// More than one editor // More than one editor
if (this.mru.length > 1) { if (this.mru.length > 1) {
let newActive: EditorInput; let newActive: EditorInput;
if (this.closeTabsInMRUOrder) { if (this.focusRecentEditorAfterClose) {
newActive = this.mru[1]; // active editor is always first in MRU, so pick second editor after as new active newActive = this.mru[1]; // active editor is always first in MRU, so pick second editor after as new active
} else { } else {
if (index === this.editors.length - 1) { if (index === this.editors.length - 1) {
......
...@@ -29,7 +29,7 @@ function inst(): IInstantiationService { ...@@ -29,7 +29,7 @@ function inst(): IInstantiationService {
inst.stub(ITelemetryService, NullTelemetryService); inst.stub(ITelemetryService, NullTelemetryService);
const config = new TestConfigurationService(); const config = new TestConfigurationService();
config.setUserConfiguration('workbench', { editor: { openPositioning: 'right', closeTabsInMRUOrder: true } }); config.setUserConfiguration('workbench', { editor: { openPositioning: 'right', focusRecentEditorAfterClose: true } });
inst.stub(IConfigurationService, config); inst.stub(IConfigurationService, config);
return inst; return inst;
...@@ -653,7 +653,7 @@ suite('Workbench editor groups', () => { ...@@ -653,7 +653,7 @@ suite('Workbench editor groups', () => {
inst.stub(ITelemetryService, NullTelemetryService); inst.stub(ITelemetryService, NullTelemetryService);
const config = new TestConfigurationService(); const config = new TestConfigurationService();
config.setUserConfiguration('workbench', { editor: { closeTabsInMRUOrder: false } }); config.setUserConfiguration('workbench', { editor: { focusRecentEditorAfterClose: false } });
inst.stub(IConfigurationService, config); inst.stub(IConfigurationService, config);
const group = inst.createInstance(EditorGroup); const group = inst.createInstance(EditorGroup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册