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

Always keep natural order of selection boundaries #401

Merged

Conversation

amantoux
Copy link
Member

when setting clipboard data, selection extent can be inverted (notably on macOS) if selection was made from end to start
This fixes the issue by calling Delta::slice with natural order of selection extents

@amantoux amantoux force-pushed the fix/incorrect_delta_slice_when_setting_data_to_clipboard branch from 14d871e to 6dd68a7 Compare August 11, 2024 16:54
@amantoux amantoux requested a review from Amir-P August 11, 2024 16:56
Copy link

codecov bot commented Aug 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.91%. Comparing base (817b2e0) to head (4bdf00a).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #401   +/-   ##
=======================================
  Coverage   87.91%   87.91%           
=======================================
  Files          62       62           
  Lines       10331    10331           
=======================================
  Hits         9083     9083           
  Misses       1248     1248           

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

Copy link
Member

@Amir-P Amir-P left a comment

Choose a reason for hiding this comment

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

Nice catch. Can you please add a test to prevent regression in the future?

@amantoux amantoux requested a review from Amir-P August 12, 2024 07:51
@amantoux
Copy link
Member Author

@Amir-P can you please review?

@amantoux amantoux force-pushed the fix/incorrect_delta_slice_when_setting_data_to_clipboard branch from 5d0f6b5 to 4bdf00a Compare August 12, 2024 08:01
Copy link
Member

@Amir-P Amir-P left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@Amir-P Amir-P merged commit e395141 into master Aug 15, 2024
4 checks passed
@Amir-P Amir-P deleted the fix/incorrect_delta_slice_when_setting_data_to_clipboard branch August 15, 2024 15:26
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