Skip to content

Commit

Permalink
Add a comment that commands for dirty diff navigation need to be alwa…
Browse files Browse the repository at this point in the history
…ys available
  • Loading branch information
pisv committed Mar 18, 2024
1 parent f8c7976 commit bf607ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/scm/src/browser/scm-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ export class ScmContribution extends AbstractViewContribution<ScmWidget> impleme
execute: () => this.acceptInput(),
isEnabled: () => !!this.scmFocus.get() && !!this.acceptInputCommand()
});

// Note that commands for dirty diff navigation need to be always available.
// This is consistent with behavior in VS Code, and also with other similar commands (such as `Next Problem/Previous Problem`) in Theia.
// See https://github.com/eclipse-theia/theia/pull/13104#discussion_r1497316614 for a detailed discussion.
commandRegistry.registerCommand(SCM_COMMANDS.GOTO_NEXT_CHANGE, {
execute: () => this.dirtyDiffNavigator.gotoNextChange()
});
Expand Down

0 comments on commit bf607ea

Please sign in to comment.