gemini-cli - ✅(Solved) Fix Bug: Selection mode (mouse mode) incorrectly active in standard buffer mode [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25070Fetched 2026-04-10 03:44:50
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Assignees
Timeline (top)
labeled ×2referenced ×2assigned ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #25071: fix(ui): restrict mouse mode toggle to full-frame modes

Description (problem / solution / changelog)

Fixes #25070

Ensures that 'selection mode' (mouse mode) cannot be toggled via Ctrl+S in standard buffer mode. Also updates AppContainer to correctly identify full-frame mode (including Terminal Buffer) for mouse capturing and state initialization.

Test Plan:

  • Verified that Ctrl+S is ignored in standard mode via unit tests.
  • Verified that Ctrl+S still works in Alternate Buffer and Terminal Buffer modes.

Changed files

  • package-lock.json (modified, +3/-31)
  • packages/cli/src/ui/AppContainer.test.tsx (modified, +74/-0)
  • packages/cli/src/ui/AppContainer.tsx (modified, +6/-9)
RAW_BUFFERClick to expand / collapse

The selection mode toggle (Ctrl+S) is handled globally in AppContainer.tsx without checking if the application is in a full-frame mode (alternate buffer or terminal buffer). This causes Ctrl+S to hijack keystrokes and enable mouse capturing even when it is not supported or desired in standard mode.

Epic: https://github.com/google-gemini/maintainers-gemini-cli/issues/1607

extent analysis

TL;DR

Modify the selection mode toggle handler in AppContainer.tsx to check for full-frame mode before enabling mouse capturing.

Guidance

  • Check the application mode before handling the Ctrl+S keystroke to prevent unintended behavior.
  • Verify that the full-frame mode check is correctly implemented by testing the application in both standard and full-frame modes.
  • Consider adding a conditional statement to only enable mouse capturing when the application is in a supported mode.
  • Review the Epic issue (https://github.com/google-gemini/maintainers-gemini-cli/issues/1607) for additional context and potential solutions.

Example

// Example code snippet (not explicitly provided in the issue, but implied)
if (isFullFrameMode()) {
  // Enable mouse capturing and handle Ctrl+S keystroke
} else {
  // Do not enable mouse capturing or handle Ctrl+S keystroke
}

Notes

The exact implementation details may vary depending on the specific requirements and constraints of the application.

Recommendation

Apply workaround: Modify the AppContainer.tsx file to include a check for full-frame mode before handling the Ctrl+S keystroke, as this will prevent unintended behavior and allow for a more robust solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING