Explorar el Código

Fixes possible extra space in compact view

main
Eric Amodio hace 6 años
padre
commit
04a994a7d1
Se han modificado 1 ficheros con 17 adiciones y 3 borrados
  1. +17
    -3
      src/git/models/status.ts

+ 17
- 3
src/git/models/status.ts Ver fichero

@ -90,9 +90,23 @@ export class GitStatus {
return `${prefix}${status}${suffix}`;
}
return `${prefix}${compact && added === 0 ? '' : `+${added}${separator}`}${
compact && changed === 0 ? '' : `~${changed}${separator}`
}${compact && deleted === 0 ? '' : `-${deleted}`}${suffix}`;
let status = '';
if (compact) {
if (added !== 0) {
status += `+${added}`;
}
if (changed !== 0) {
status += `${status.length === 0 ? '' : separator}~${changed}`;
}
if (deleted !== 0) {
status += `${status.length === 0 ? '' : separator}-${deleted}`;
}
}
else {
status += `+${added}${separator}~${changed}${separator}-${deleted}`;
}
return `${prefix}${status}${suffix}`;
}
getUpstreamStatus(options: {

Cargando…
Cancelar
Guardar