Skip to content

Fix duplicate Escape hint in inspect-commit view - #3023

Open
dcavalcante wants to merge 1 commit into
gitui-org:masterfrom
dcavalcante:fix/inspect-commit-close-hint
Open

Fix duplicate Escape hint in inspect-commit view#3023
dcavalcante wants to merge 1 commit into
gitui-org:masterfrom
dcavalcante:fix/inspect-commit-close-hint

Conversation

@dcavalcante

Copy link
Copy Markdown

Summary

  • show Close [Esc] only while commit details are focused
  • show Back [Esc] only while the diff is focused
  • keep the Escape action first in the quick bar for both focus states

Cause

The inspect-commit popup registered Close [Esc] unconditionally and again while the diff was focused, so the quick bar showed the same action twice. Escape has different behavior in each focus state: it closes the popup from commit details and returns to commit details from the diff.

Testing

  • cargo fmt --check
  • cargo test

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.

1 participant