Skip to content

font annotations: make delete annotations work with intersecting annotations#292815

Merged
aiday-mar merged 2 commits intomainfrom
screeching-orangutan
Feb 4, 2026
Merged

font annotations: make delete annotations work with intersecting annotations#292815
aiday-mar merged 2 commits intomainfrom
screeching-orangutan

Conversation

@aiday-mar
Copy link
Contributor

fixes #292286

Copilot AI review requested due to automatic review settings February 4, 2026 11:33
@aiday-mar aiday-mar self-assigned this Feb 4, 2026
@aiday-mar aiday-mar changed the title make delete annotations work with intersecting annotations font annotations: make delete annotations work with intersecting annotations Feb 4, 2026
@aiday-mar aiday-mar marked this pull request as ready for review February 4, 2026 11:42
@aiday-mar aiday-mar enabled auto-merge (squash) February 4, 2026 11:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where font token customization settings weren't being properly cleaned up when changed, causing certain lines to be incorrectly centered. The fix modifies the annotation intersection logic to properly handle deletion of annotations at boundary positions.

Changes:

  • Modified intersection logic in _getEndIndexOfIntersectingAnnotation to include annotations that start exactly at the query range's end position
  • Added a new test case demonstrating deletion of an annotation using an empty range at its start position
  • Updated two existing test cases to reflect the new intersection semantics

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/editor/common/model/tokens/annotations.ts Changed boundary condition from > to >= to properly detect annotations starting at the query offset
src/vs/editor/test/common/model/annotations.test.ts Added test for empty-range annotation deletion and updated existing intersection tests to match new semantics

@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 4, 2026
@aiday-mar aiday-mar merged commit cc4c023 into main Feb 4, 2026
22 checks passed
@aiday-mar aiday-mar deleted the screeching-orangutan branch February 4, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing the font token customization settings leave certain lines incorrectly centered

3 participants