Skip to content

fix(popups): command-bar toggle ([.]) works inside diff/commit viewer popups#2999

Open
stevenpollack wants to merge 1 commit into
gitui-org:masterfrom
stevenpollack:fix/cmdbar-toggle-in-viewers
Open

fix(popups): command-bar toggle ([.]) works inside diff/commit viewer popups#2999
stevenpollack wants to merge 1 commit into
gitui-org:masterfrom
stevenpollack:fix/cmdbar-toggle-in-viewers

Conversation

@stevenpollack

Copy link
Copy Markdown

The Inspect Commit, Compare, File History and Blame popups consume every key while open (a blanket return Ok(EventState::Consumed) at the end of their event()), so the command bar more/less toggle (., cmd_bar_toggle) never reaches the app-level handler in App::event and does nothing inside those popups.

Fix

Pass the cmd_bar_toggle key through (NotConsumed) at the top of each of those four popups' key handling, so it bubbles up to the existing app-level toggle. Everything else stays modal.

These popups host no text input, so letting . through can't hijack typing.

Before / after

  • Before: enter Inspect Commit (Enter on a commit in the Log tab), or open Compare / File History / Blame, then press . — the command bar never expands, even though more [.] is shown.
  • After: . toggles more/less in all four viewers, matching the behaviour in the main tabs.

🤖 Generated with Claude Code

…wers

The Inspect Commit, Compare, File History and Blame popups consumed
every key while open (a blanket `EventState::Consumed`), so the command
bar `more`/`less` toggle ([.]) never reached the app-level handler and
did nothing inside them. Pass the cmd_bar_toggle key through
(`NotConsumed`) so it bubbles up. None of these popups host a text
input, so this cannot hijack typing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
stevenpollack added a commit to stevenpollack/gitui that referenced this pull request Jul 15, 2026
Patch bump for the command-bar toggle fix in the diff/commit viewer
popups (upstream PR gitui-org#2999). Cut the changelog Unreleased
entries under [0.31.1].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LrbVApNVj46mmVyzfqgDsx
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