Skip to content

Commit

Permalink
start activeEditorGroupIndex from 1 instead of 0 (for microsoft#22755)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored and hwhung0111 committed Aug 28, 2019
1 parent ea0e093 commit 56bddc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/contextkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class WorkbenchContextKeysHandler extends Disposable {
this.multipleEditorGroupsContext.reset();
}

this.activeEditorGroupIndex.set(activeGroup.index);
this.activeEditorGroupIndex.set(activeGroup.index + 1); // not zero-indexed
this.activeEditorGroupLast.set(activeGroup.index === groupCount - 1);

if (activeControl) {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/common/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const NoEditorsVisibleContext: ContextKeyExpr = EditorsVisibleContext.toN
export const TextCompareEditorVisibleContext = new RawContextKey<boolean>('textCompareEditorVisible', false);
export const TextCompareEditorActiveContext = new RawContextKey<boolean>('textCompareEditorActive', false);
export const ActiveEditorGroupEmptyContext = new RawContextKey<boolean>('activeEditorGroupEmpty', false);
export const ActiveEditorGroupIndexContext = new RawContextKey<number>('activeEditorGroupIndex', -1);
export const ActiveEditorGroupIndexContext = new RawContextKey<number>('activeEditorGroupIndex', 0);
export const ActiveEditorGroupLastContext = new RawContextKey<boolean>('activeEditorGroupLast', false);
export const MultipleEditorGroupsContext = new RawContextKey<boolean>('multipleEditorGroups', false);
export const SingleEditorGroupsContext = MultipleEditorGroupsContext.toNegated();
Expand Down

0 comments on commit 56bddc4

Please sign in to comment.