Skip to content

Conversation

@ShahzaibIbrahim
Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim commented Dec 18, 2025

Because of rounding errors the bracket selection highlight is often inconsistent. Making use of residual values provides precise rectangle values and highlight is consistent across all zooms

Problem # 1: At 125% the highlight height is too small. Almost touching the bracket
image

Problem # 2: At 250% (the problem is also there for all zooms, at 250 its just better visible), After every three line the fourth line x axis is bit too much on the left. (rounding error)

line 29: the width of highlight is 17px

image

line 30: the width of highlight is 16px

image

How to test

  • Run the runtime workspace with monitor-specific scaling turned on
  • Add some brackets in Java file { }
  • Select the opening bracket, the closing bracket will be highlighted.
  • See if the rectangle around highlighted bracket is surrounded the bracket correctly (no-cutoffs)

Result

Before Fix:
image

After Fix:
image

Requires:

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Test Results

 3 015 files  ±0   3 015 suites  ±0   2h 9m 3s ⏱️ - 6m 54s
 8 258 tests ±0   8 010 ✅ ±0  248 💤 ±0  0 ❌ ±0 
23 598 runs  ±0  22 807 ✅ ±0  791 💤 ±0  0 ❌ ±0 

Results for commit a309909. ± Comparison against base commit 93acda3.

♻️ This comment has been updated with latest results.

@ShahzaibIbrahim ShahzaibIbrahim changed the title Bracket selection square too small Use stable Y-coordinate for character highlight and adjust height Dec 22, 2025
@ShahzaibIbrahim ShahzaibIbrahim marked this pull request as ready for review December 22, 2025 13:12
@ShahzaibIbrahim ShahzaibIbrahim changed the title Use stable Y-coordinate for character highlight and adjust height Use OfFloat Point values to create precise highlight brackets Dec 22, 2025
Because of rounding errors the bracket selection highlight is often
inconsistent. Making use of residual values provides precise rectangle
values and highlight is consistent across all zooms
Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

Is it intended that with removing the -1 from the height calculation, the highlight is now too high and exceeds the line?
image

Before:
image

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.

Bracket selection square too small in some zooms

2 participants