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

Final Text & Selection Inset Fix #67

Merged
merged 9 commits into from
Feb 2, 2025

Conversation

thecoolwinter
Copy link
Contributor

Description

The linked pull request revealed issues with how we draw selections. This finishes a series of patches finishing exactly how we can inset text and selections. This change makes multi-line selections select only text regions, rather than being determined by the available space to draw selections, making multi-line selections draw uniformly.

It also simplifies the drawing logic, using a single function for determining all selection drawing rects, rather than three different logic paths.

The issue mentioned in the linked pr has been opened on this repository. I'll be opening a related pr in CESE reverting that change for a later update.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Note the trailing padding, and the leading single selection spacing. After this change, we can inset the leading textInset and still have correct multi-line selections.

After this change (in CESE):
Screenshot 2025-02-01 at 9 18 05 PM
Screenshot 2025-02-01 at 9 17 54 PM

Before:
Screenshot 2025-02-01 at 9 19 32 PM
Screenshot 2025-02-01 at 9 19 35 PM

@thecoolwinter thecoolwinter merged commit 1792167 into CodeEditApp:main Feb 2, 2025
2 checks passed
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.

2 participants