Browse Source

Always return spacing for ${working}

main
Eric Amodio 6 years ago
parent
commit
1cb072a039
2 changed files with 9 additions and 7 deletions
  1. +1
    -0
      src/constants.ts
  2. +8
    -7
      src/git/formatters/statusFormatter.ts

+ 1
- 0
src/constants.ts View File

@ -103,6 +103,7 @@ export enum GlyphChars {
Pencil = '\u270E',
Space = '\u00a0',
SpaceThin = '\u2009',
SpaceThinnest = '\u200A',
SquareWithBottomShadow = '\u274F',
SquareWithTopShadow = '\u2750',
ZeroWidthSpace = '\u200b'

+ 8
- 7
src/git/formatters/statusFormatter.ts View File

@ -50,15 +50,16 @@ export class StatusFileFormatter extends Formatter
let icon = '';
if (statusFile.workingTreeStatus !== undefined && statusFile.indexStatus !== undefined) {
icon = `${GlyphChars.Pencil}${GlyphChars.Space}${GlyphChars.Check}`;
icon = `${GlyphChars.Pencil}${GlyphChars.Space}${GlyphChars.SpaceThinnest}${GlyphChars.Check}`;
}
else if (statusFile.workingTreeStatus !== undefined) {
icon = `${GlyphChars.Pencil}${GlyphChars.Space.repeat(4)}`;
}
else if (statusFile.indexStatus !== undefined) {
icon = `${GlyphChars.Space.repeat(5)}${GlyphChars.Check}`;
}
else {
if (statusFile.workingTreeStatus !== undefined) {
icon = `${GlyphChars.Pencil}${GlyphChars.Space.repeat(4)}`;
}
else if (statusFile.indexStatus !== undefined) {
icon = `${GlyphChars.Space.repeat(5)}${GlyphChars.Check}`;
}
icon = GlyphChars.Space.repeat(8);
}
return this._padOrTruncate(icon, this._options.tokenOptions!.working);
}

Loading…
Cancel
Save