adding code
parent
5addef1677
commit
4ee17c532e
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue