Skip to content

Changing the font token customization settings leave certain lines with incorrect line height #292820

@aiday-mar

Description

@aiday-mar
  • Place the following in the settings:
{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.type.class",
                "settings": {
                    "fontSize": 3,
                    "lineHeight": 2
                }
            }
        ]
    },
}
  • Open the following files:
export class StickyScrollWidgetState {
	constructor(
		readonly startLineNumbers: number[],
		readonly endLineNumbers: number[],
		readonly lastLineRelativePosition: number,
		readonly showEndForLine: number | null = null
	) { }

	equals(other: StickyScrollWidgetState | undefined): boolean {
		return !!other
			&& this.lastLineRelativePosition === other.lastLineRelativePosition
			&& this.showEndForLine === other.showEndForLine
			&& equals(this.startLineNumbers, other.startLineNumbers)
			&& equals(this.endLineNumbers, other.endLineNumbers);
	}

	static get Empty() {
		return new StickyScrollWidgetState([], [], 0);
	}
}

  • Observe the StickyScrollWidget line is higher sized
  • Set the settings to:
{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "meta.class.ts",
                "settings": {
                    "fontSize": 3,
                    "lineHeight": 2
                }
            }
        ]
    }
}
  • Observe the whole class line heights are higher sized
  • Set the setting back to:
{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.type.class",
                "settings": {
                    "fontSize": 3,
                    "lineHeight": 2
                }
            }
        ]
    },
}
  • Observe certain lines like line 9 with the empty text is higher sized even though it shouldn't be 🐛
Screen.Recording.2026-02-04.at.12.46.23.mov

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfont-token-customizationinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions