adding code

pull/233110/head
Aiday Marlen Kyzy 2025-01-08 12:27:27 +01:00
parent 5addef1677
commit 4ee17c532e
No known key found for this signature in database
GPG Key ID: D55A35EAC79FDA9A
1 changed files with 4 additions and 8 deletions

View File

@ -193,7 +193,7 @@ export class ViewCursor {
}
const top = ctx.getVerticalOffsetForLineNumber(position.lineNumber) - ctx.bigNumbersDelta;
return new ViewCursorRenderData(top, left, paddingLeft, width, this._heightForLineNumber(position.lineNumber), textContent, textContentClassName);
return new ViewCursorRenderData(top, left, paddingLeft, width, this._lineHeightForLineNumber(position.lineNumber), textContent, textContentClassName);
}
const visibleRangeForCharacter = ctx.linesVisibleRangesForRange(new Range(position.lineNumber, position.column, position.lineNumber, position.column + nextGrapheme.length), false);
@ -223,7 +223,7 @@ export class ViewCursor {
}
let top = ctx.getVerticalOffsetForLineNumber(position.lineNumber) - ctx.bigNumbersDelta;
let height = this._heightForLineNumber(position.lineNumber);
let height = this._lineHeightForLineNumber(position.lineNumber);
// Underline might interfere with clicking
if (this._cursorStyle === TextEditorCursorStyle.Underline || this._cursorStyle === TextEditorCursorStyle.UnderlineThin) {
@ -234,12 +234,8 @@ export class ViewCursor {
return new ViewCursorRenderData(top, range.left, 0, width, height, textContent, textContentClassName);
}
private _heightForLineNumber(lineNumber: number): number {
const specialLinesHeights = this._context.viewLayout.getSpecialLinesHeights();
if (specialLinesHeights.has(lineNumber)) {
return specialLinesHeights.get(lineNumber)!;
}
return this._lineHeight;
private _lineHeightForLineNumber(lineNumber: number): number {
return this._context.viewLayout.getLineHeightForLineNumber(lineNumber);
}
private _getTokenClassName(position: Position): string {