Skip to content

Commit f9bbc9a

Browse files
committed
Attempts to fix #80 - on line with link, annotation gets underlined
1 parent 9cc96d4 commit f9bbc9a

File tree

3 files changed

+431
-427
lines changed

3 files changed

+431
-427
lines changed

src/annotations/annotationController.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import { WhitespaceController } from './whitespaceController';
1212

1313
export const Decorations = {
1414
annotation: window.createTextEditorDecorationType({
15-
isWholeLine: true
15+
isWholeLine: true,
16+
textDecoration: 'none'
1617
} as DecorationRenderOptions),
1718
highlight: undefined as TextEditorDecorationType | undefined
1819
};
@@ -233,7 +234,7 @@ export class AnnotationController extends Disposable {
233234
for (const [key, p] of this._annotationProviders) {
234235
if (!TextDocumentComparer.equals(p.document, e.document)) continue;
235236

236-
// TODO: Rework this once https://github.com/Microsoft/vscode/issues/27231 is released in v1.13
237+
// TODO: Rework this once https://github.com/Microsoft/vscode/issues/27231 is released in v1.13
237238
// We have to defer because isDirty is not reliable inside this event
238239
setTimeout(() => {
239240
// If the document is dirty all is fine, just kick out since the GitContextTracker will handle it

src/annotations/annotations.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ export class Annotations {
7777
before: {
7878
...renderOptions.before,
7979
...{
80-
contentText: content,
81-
margin: '0 26px 0 0'
80+
contentText: content
8281
}
8382
},
8483
dark: {
@@ -113,7 +112,9 @@ export class Annotations {
113112
before: {
114113
borderStyle: borderStyle,
115114
borderWidth: borderWidth,
116-
height: cfgFileTheme.separateLines ? 'calc(100% - 1px)' : '100%'
115+
height: cfgFileTheme.separateLines ? 'calc(100% - 1px)' : '100%',
116+
margin: '0 26px 0 0',
117+
textDecoration: 'none'
117118
},
118119
dark: {
119120
backgroundColor: cfgFileTheme.dark.backgroundColor || undefined,
@@ -123,7 +124,7 @@ export class Annotations {
123124
backgroundColor: cfgFileTheme.light.backgroundColor || undefined,
124125
color: cfgFileTheme.light.foregroundColor || themeDefaults.annotations.file.gutter.light.foregroundColor
125126
} as DecorationInstanceRenderOptions
126-
};
127+
} as IRenderOptions;
127128
}
128129

129130
static hover(commit: GitCommit, renderOptions: IRenderOptions, heatmap: boolean): DecorationOptions {
@@ -142,7 +143,8 @@ export class Annotations {
142143
borderWidth: '0 0 0 2px',
143144
contentText: '\u200B',
144145
height: cfgTheme.annotations.file.hover.separateLines ? 'calc(100% - 1px)' : '100%',
145-
margin: '0 26px 0 0'
146+
margin: '0 26px 0 0',
147+
textDecoration: 'none'
146148
}
147149
} as IRenderOptions;
148150
}

0 commit comments

Comments
 (0)