Skip to content

Commit

Permalink
Use correct context key
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-grant-work committed Mar 7, 2022
1 parent 223c372 commit 9f45e11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/browser/common-frontend-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
}

protected updatePinnedKey(): void {
const value = this.shell.activeWidget && this.shell.activeWidget.title.className.indexOf(PINNED_CLASS) >= 0;
const value = Boolean(this.shell.activeWidget?.title.closable === false && this.shell.activeWidget.title.className.includes(PINNED_CLASS))
this.pinnedKey.set(value);
}

Expand Down Expand Up @@ -1052,12 +1052,12 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
{
command: CommonCommands.PIN_TAB.id,
keybinding: 'ctrlcmd+k shift+enter',
when: '!activeWidgetIsPinned'
when: '!activeEditorIsPinned'
},
{
command: CommonCommands.UNPIN_TAB.id,
keybinding: 'ctrlcmd+k shift+enter',
when: 'activeWidgetIsPinned'
when: 'activeEditorIsPinned'
}
);
}
Expand Down

0 comments on commit 9f45e11

Please sign in to comment.