Skip to content

Commit

Permalink
GH-4619: Adjusted ahead/behind on the status-bar.
Browse files Browse the repository at this point in the history
Hide ahead/behind when no changes.

Closes #4619.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
  • Loading branch information
Akos Kitta authored and kittaakos committed Apr 12, 2019
1 parent edcf378 commit d334126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/git/src/browser/git-view-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export class GitViewContribution extends AbstractViewContribution<GitWidget>
const { upstreamBranch, aheadBehind } = status;
if (upstreamBranch) {
return {
text: '$(refresh)' + (aheadBehind ? ` ${aheadBehind.behind} $(arrow-down) ${aheadBehind.ahead} $(arrow-up)` : ''),
text: '$(refresh)' + (aheadBehind && (aheadBehind.ahead + aheadBehind.behind) > 0 ? ` ${aheadBehind.behind}${aheadBehind.ahead}` : ''),
command: GIT_COMMANDS.SYNC.id,
tooltip: 'Synchronize Changes'
};
Expand Down

0 comments on commit d334126

Please sign in to comment.