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

Disable hunk diff arrow buttons when there's only one hunk #21437

Merged

Conversation

danilo-leal
Copy link
Contributor

@danilo-leal danilo-leal commented Dec 3, 2024

Closes #20817

One hunk Multiple hunks
Screenshot 2024-12-03 at 09 42 49 Screenshot 2024-12-02 at 23 36 38

Release Notes:

  • Fixed showing prev/next hunk navigation buttons when there is only one hunk

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 3, 2024
@Angelk90
Copy link

Angelk90 commented Dec 3, 2024

@danilo-leal : order of the next and preview arrows, wouldn't it make more sense the other way around?

Webstorm:
Screenshot 2024-12-03 alle 09 42 32

@danilo-leal
Copy link
Contributor Author

danilo-leal commented Dec 3, 2024

@Angelk90 I guess so, yeah. It also makes sense with spoken language, as we always say "up and down" instead of "down and up". But I figure the current order is there given that, if you start traversing the file from its very first hunk, your next stop (first button) will be going down, and not up (unless you start checking diffs from bottom-up, and not top-down, which feels unusual). So, I'm not sure. Might hold off on this for now.

@danilo-leal danilo-leal changed the title Hide hunk diff arrow buttons when there's only one hunk Disable hunk diff arrow buttons when there's only one hunk Dec 3, 2024
@danilo-leal danilo-leal merged commit a76cd77 into zed-industries:main Dec 3, 2024
14 checks passed
@danilo-leal danilo-leal deleted the hunk-diff-arrow-buttons branch December 3, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable prev and next hunk controls when there is only one change
2 participants