Skip to content

Commit d9877ca

Browse files
authored
Inline codespan in comments widget uses wrong font (microsoft#186893)
Fixes microsoft#186768
1 parent d88c763 commit d9877ca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeServic
1919
import { CommentGlyphWidget } from 'vs/workbench/contrib/comments/browser/commentGlyphWidget';
2020
import { ICommentService } from 'vs/workbench/contrib/comments/browser/commentService';
2121
import { ICommentThreadWidget } from 'vs/workbench/contrib/comments/common/commentThreadWidget';
22-
import { EditorOption } from 'vs/editor/common/config/editorOptions';
22+
import { EDITOR_FONT_DEFAULTS, EditorOption, IEditorOptions } from 'vs/editor/common/config/editorOptions';
2323
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
2424
import { CommentThreadWidget } from 'vs/workbench/contrib/comments/browser/commentThreadWidget';
2525
import { ICellRange } from 'vs/workbench/contrib/notebook/common/notebookRange';
2626
import { commentThreadStateBackgroundColorVar, commentThreadStateColorVar, getCommentThreadStateBorderColor } from 'vs/workbench/contrib/comments/browser/commentColors';
2727
import { peekViewBorder } from 'vs/editor/contrib/peekView/browser/peekView';
28+
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
2829

2930
function getCommentThreadWidgetStateColor(thread: languages.CommentThreadState | undefined, theme: IColorTheme): Color | undefined {
3031
return getCommentThreadStateBorderColor(thread, theme) ?? theme.getColor(peekViewBorder);
@@ -126,7 +127,8 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
126127
@IInstantiationService instantiationService: IInstantiationService,
127128
@IThemeService private themeService: IThemeService,
128129
@ICommentService private commentService: ICommentService,
129-
@IContextKeyService contextKeyService: IContextKeyService
130+
@IContextKeyService contextKeyService: IContextKeyService,
131+
@IConfigurationService private readonly configurationService: IConfigurationService
130132
) {
131133
super(editor, { keepEditorSelection: true });
132134
this._contextKeyService = contextKeyService.createScoped(this.domNode);
@@ -223,7 +225,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
223225
this._commentThread as unknown as languages.CommentThread<IRange | ICellRange>,
224226
this._pendingComment,
225227
this._pendingEdits,
226-
{ editor: this.editor, codeBlockFontSize: '' },
228+
{ editor: this.editor, codeBlockFontSize: '', codeBlockFontFamily: this.configurationService.getValue<IEditorOptions>('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily },
227229
this._commentOptions,
228230
{
229231
actionRunner: () => {

0 commit comments

Comments
 (0)