mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-31 09:35:42 -05:00
Fixes issue with whitespace collapsing in decorations
This commit is contained in:
@@ -109,14 +109,14 @@ export class Annotations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gutter(commit: GitCommit, format: string, dateFormatOrFormatOptions: string | null | ICommitFormatOptions, renderOptions: IRenderOptions): DecorationOptions {
|
static gutter(commit: GitCommit, format: string, dateFormatOrFormatOptions: string | null | ICommitFormatOptions, renderOptions: IRenderOptions): DecorationOptions {
|
||||||
const content = Strings.pad(CommitFormatter.fromTemplate(format, commit, dateFormatOrFormatOptions), 1, 1);
|
const message = CommitFormatter.fromTemplate(format, commit, dateFormatOrFormatOptions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
renderOptions: {
|
renderOptions: {
|
||||||
before: {
|
before: {
|
||||||
...renderOptions.before,
|
...renderOptions.before,
|
||||||
...{
|
...{
|
||||||
contentText: content
|
contentText: Strings.pad(message.replace(/ /g, GlyphChars.Space), 1, 1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
@@ -210,10 +210,11 @@ export class Annotations {
|
|||||||
truncateMessageAtNewLine: true,
|
truncateMessageAtNewLine: true,
|
||||||
dateFormat: dateFormat
|
dateFormat: dateFormat
|
||||||
} as ICommitFormatOptions);
|
} as ICommitFormatOptions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
renderOptions: {
|
renderOptions: {
|
||||||
after: {
|
after: {
|
||||||
contentText: Strings.pad(message, 1, 1)
|
contentText: Strings.pad(message.replace(/ /g, GlyphChars.Space), 1, 1)
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
after: {
|
after: {
|
||||||
|
|||||||
Reference in New Issue
Block a user