mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
prevent empty markdown string from appearing in the hover (#168168)
fixes https://github.com/microsoft/vscode/issues/162227#issuecomment-1337563966
This commit is contained in:
parent
37a74f9e41
commit
62d8f662fb
|
@ -212,7 +212,7 @@ export class GotoDefinitionAtPositionEditorContribution implements IEditorContri
|
|||
const languageId = this.languageService.guessLanguageIdByFilepathOrFirstLine(textEditorModel.uri);
|
||||
this.addDecoration(
|
||||
linkRange,
|
||||
new MarkdownString().appendCodeblock(languageId ? languageId : '', previewValue)
|
||||
previewValue ? new MarkdownString().appendCodeblock(languageId ? languageId : '', previewValue) : undefined
|
||||
);
|
||||
ref.dispose();
|
||||
});
|
||||
|
@ -260,7 +260,7 @@ export class GotoDefinitionAtPositionEditorContribution implements IEditorContri
|
|||
return new Range(startLineNumber, 1, endLineNumber + 1, 1);
|
||||
}
|
||||
|
||||
private addDecoration(range: Range, hoverMessage: MarkdownString): void {
|
||||
private addDecoration(range: Range, hoverMessage: MarkdownString | undefined): void {
|
||||
|
||||
const newDecorations: IModelDeltaDecoration = {
|
||||
range: range,
|
||||
|
|
Loading…
Reference in a new issue