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

Fix issue when crop start == cell length of a Strip #3998

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Conversation

darrenburns
Copy link
Member

When the start of the crop window aligned perfectly with the end of the Strip, the entire Strip was incorrectly being returned

Before this change:

Strip([Segment("foo")]).crop(3, 8) == Strip([Segment("foo")]) 🔴 
Strip([Segment("foo")]).crop(4, 8) == Strip([]) 🟢 

After this change:

Strip([Segment("foo")]).crop(3, 8) == Strip([]) 🟢 
Strip([Segment("foo")]).crop(4, 8) == Strip([]) 🟢 

@darrenburns darrenburns marked this pull request as ready for review January 10, 2024 11:16
@rodrigogiraoserrao
Copy link
Contributor

Thanks for the emoji semaphore lights.
As someone who identifies both as a millenial and as a Gen Z, the Gen Z in me appreciates the clearly colour-coded examples.
Also, I'm afraid these emoji might not be inclusive for colourblind people.
I recommend ✅❌ the next time.

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
@darrenburns
Copy link
Member Author

Thanks for the emoji semaphore lights. As someone who identifies both as a millenial and as a Gen Z, the Gen Z in me appreciates the clearly colour-coded examples. Also, I'm afraid these emoji might not be inclusive for colourblind people. I recommend ✅❌ the next time.

I tried to use those emojis but I couldn't find the red cross in the GitHub emoji dropdown 😂

@darrenburns darrenburns merged commit e646916 into main Jan 10, 2024
20 checks passed
@darrenburns darrenburns deleted the strip-crop-bug branch January 10, 2024 12:58
willmcgugan pushed a commit that referenced this pull request Jan 11, 2024
* Fix issue when crop start was == cell length of a Strip

* Update changelog

* Update CHANGELOG.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
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.

3 participants