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

make text selection a struct #203

Merged
merged 2 commits into from
Jun 27, 2024
Merged

make text selection a struct #203

merged 2 commits into from
Jun 27, 2024

Conversation

TTWNO
Copy link
Member

@TTWNO TTWNO commented Jun 27, 2024

Fix #195

  • TextSelection is now a struct, and has validation tests
  • Add type validation info to markdown file

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.97%. Comparing base (d8e2bdb) to head (5e1d524).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
+ Coverage   86.95%   86.97%   +0.02%     
==========================================
  Files          40       40              
  Lines        3518     3525       +7     
==========================================
+ Hits         3059     3066       +7     
  Misses        459      459              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TTWNO TTWNO force-pushed the make-text-selection-a-struct branch from 9949c9b to 5e1d524 Compare June 27, 2024 15:15
pub type TextSelection = (ObjectRef, i32, ObjectRef, i32, bool);
/// Describes a selection of text, including selections across object boundaries.
/// For example, selecting from the beginning of a paragraph to half way through a link would cause
/// the start and end object references to be different.
Copy link
Collaborator

Choose a reason for hiding this comment

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

TIL, again! Great stuff, thanks!

Copy link
Collaborator

@luukvanderduim luukvanderduim left a comment

Choose a reason for hiding this comment

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

Big improvement, thanks!

@TTWNO TTWNO merged commit 34cc6bd into main Jun 27, 2024
14 checks passed
@TTWNO TTWNO deleted the make-text-selection-a-struct branch June 27, 2024 19:55
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.

Convert TextSelection to more descriptive type
2 participants