Parcourir la source

Always return spacing for ${working}

main
Eric Amodio il y a 6 ans
Parent
révision
1cb072a039
2 fichiers modifiés avec 9 ajouts et 7 suppressions
  1. +1
    -0
      src/constants.ts
  2. +8
    -7
      src/git/formatters/statusFormatter.ts

+ 1
- 0
src/constants.ts Voir le fichier

@ -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 Voir le fichier

@ -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);
}

Chargement…
Annuler
Enregistrer