Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection background drawn with the line spacing for multiline selection #1329

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

tobiasmelcher
Copy link
Contributor

Line selection background is drawn without the line spacing value in the StyledText control. For a multiline selection, a zebra effect occurs which looks questionable from my point of view. In this change, the line spacing height is included when drawing the selection background.

Before with line spacing value 60%:
multiline_selection_line_spacing_before

After with line spacing value 60%:
multiline_selection_line_spacing_after

Copy link
Contributor

github-actions bot commented Jul 8, 2024

Test Results

   486 files  ±0     486 suites  ±0   7m 52s ⏱️ -33s
 4 151 tests ±0   4 143 ✅ ±0   8 💤 ±0  0 ❌ ±0 
16 358 runs  ±0  16 266 ✅ ±0  92 💤 ±0  0 ❌ ±0 

Results for commit d97c17a. ± Comparison against base commit 2374dcf.

♻️ This comment has been updated with latest results.

@BeckerWdf
Copy link
Contributor

contributes to #1286

@BeckerWdf
Copy link
Contributor

if nobody objects I will merge this today EoB.

@BeckerWdf
Copy link
Contributor

@sratz: Do you have more insights into that? Do you see problems / side effects with this change?

@BeckerWdf BeckerWdf added this to the 4.33 M3 milestone Aug 7, 2024
@sratz
Copy link
Member

sratz commented Aug 7, 2024

@sratz: Do you have more insights into that? Do you see problems / side effects with this change?

This change looks good.

By not extending the selection of the last line to the bottom, this avoids many other minor visual issues (e.g. if there is also an other highlight applied on the last line, such as a marked occurrence or a search result).

However: This change only fixes it for Win32. What about macOS and Linux? Can the same fix be applied there as well?

@tobiasmelcher
Copy link
Contributor Author

the latest patch request contains implementations for windows, linux and mac.

Windows:
windows

Linux:
linux

Mac:
mac

@sratz
Copy link
Member

sratz commented Aug 21, 2024

I missed to merge this change for the M3 deadline :(

Any chance this could go in for RC1?

The coding is rather safe, especially in the default 'line spacing 0' case, in which no behavior is changed at all.

@merks
Copy link
Contributor

merks commented Aug 21, 2024

@sratz

It is fixing a bug and I trust in your good judgement, so I will defer the decision to you with a +1 from me (the PMC).

@sratz
Copy link
Member

sratz commented Aug 21, 2024

@sratz

It is fixing a bug and I trust in your good judgement, so I will defer the decision to you with a +1 from me (the PMC).

Thanks!

@sratz sratz merged commit dbff74c into eclipse-platform:master Aug 21, 2024
14 checks passed
@sratz sratz modified the milestones: 4.33 M3, 4.33 RC1 Aug 21, 2024
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.

4 participants