Skip to content

Commit 2347ccb

Browse files
authored
Review usages of EditorOption.lineHeight (microsoft#248794) (microsoft#250625)
1 parent 519df4f commit 2347ccb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ export class DictationWidget extends Disposable implements IContentWidget {
152152
}
153153

154154
beforeRender(): IDimension | null {
155-
const lineHeight = this.editor.getOption(EditorOption.lineHeight);
155+
const position = this.editor.getPosition();
156+
const lineHeight = position ? this.editor.getLineHeightForPosition(position) : this.editor.getOption(EditorOption.lineHeight);
156157
const width = this.editor.getLayoutInfo().contentWidth * 0.7;
157158

158159
this.domNode.style.setProperty('--vscode-editor-dictation-widget-height', `${lineHeight}px`);

0 commit comments

Comments
 (0)