Skip to content

Commit 2af54d2

Browse files
stevenpollackclaude
andcommitted
fix(popups): let the command-bar toggle ([.]) work in diff/commit viewers
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. Safe: none of these popups host a text input, so this can't hijack typing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LrbVApNVj46mmVyzfqgDsx
1 parent 23456d2 commit 2af54d2

5 files changed

Lines changed: 25 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Fixes
11+
* the command bar `more`/`less` toggle ([.]) now works inside the diff/commit viewer popups (inspect commit, compare, file history, blame) — previously those modal popups swallowed the key
12+
1013
## [0.31.0] - 2026-07-15
1114

1215
### Added

src/popups/blame_file.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ impl Component for BlameFilePopup {
255255
) -> Result<EventState> {
256256
if self.is_visible() {
257257
if let Event::Key(key) = event {
258+
// let the command bar more/less toggle ([.])
259+
// bubble up to the app-level handler
260+
if key_match(key, self.key_config.keys.cmd_bar_toggle)
261+
{
262+
return Ok(EventState::NotConsumed);
263+
}
258264
if key_match(key, self.key_config.keys.exit_popup) {
259265
self.hide_stacked(false);
260266
} else if key_match(key, self.key_config.keys.move_up)

src/popups/compare_commits.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ impl Component for CompareCommitsPopup {
117117
}
118118

119119
if let Event::Key(e) = ev {
120+
// let the command bar more/less toggle ([.])
121+
// bubble up to the app-level handler
122+
if key_match(e, self.key_config.keys.cmd_bar_toggle) {
123+
return Ok(EventState::NotConsumed);
124+
}
120125
if key_match(e, self.key_config.keys.exit_popup) {
121126
if self.diff.focused() {
122127
self.details.focus(true);

src/popups/file_revlog.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,12 @@ impl Component for FileRevlogPopup {
501501
}
502502

503503
if let Event::Key(key) = event {
504+
// let the command bar more/less toggle ([.])
505+
// bubble up to the app-level handler
506+
if key_match(key, self.key_config.keys.cmd_bar_toggle)
507+
{
508+
return Ok(EventState::NotConsumed);
509+
}
504510
if key_match(key, self.key_config.keys.exit_popup) {
505511
if self.diff.focused() {
506512
self.diff.focus(false);

src/popups/inspect_commit.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ impl Component for InspectCommitPopup {
154154
}
155155

156156
if let Event::Key(e) = ev {
157+
// let the command bar more/less toggle ([.])
158+
// bubble up to the app-level handler
159+
if key_match(e, self.key_config.keys.cmd_bar_toggle) {
160+
return Ok(EventState::NotConsumed);
161+
}
157162
if key_match(e, self.key_config.keys.exit_popup) {
158163
if self.diff.focused() {
159164
self.details.focus(true);

0 commit comments

Comments
 (0)