Skip to content

Ensures CollectionNavigator does not repond to alt or ctrl keys#5014

Open
tig wants to merge 29 commits intodevelopfrom
fix/collection-nav
Open

Ensures CollectionNavigator does not repond to alt or ctrl keys#5014
tig wants to merge 29 commits intodevelopfrom
fix/collection-nav

Conversation

@tig
Copy link
Copy Markdown
Collaborator

@tig tig commented Apr 20, 2026

Fixes

  • Fixes #_____

Proposed Changes/Todos

Pull request overview

Updates collection navigation key filtering so Alt/Ctrl-modified keystrokes don’t trigger collection navigation when kitty “associated text” provides a printable rune.

Changes:

  • Tighten DefaultCollectionNavigatorMatcher.IsCompatibleKey to reject keys when IsAlt or IsCtrl is set (even if AsRune is printable due to AssociatedText).
  • Add regression coverage for the “AssociatedText present + Alt/Ctrl modifier” scenario in CollectionNavigatorTests.
  • Minor test cleanups/formatting adjustments (unused locals, array formatting).

tig added 27 commits April 8, 2026 13:34
IsCompatibleKey now rejects keys with Alt or Ctrl modifiers, ensuring only plain character keys are accepted for search. Added tests to verify this behavior, including scenarios with AssociatedText. Refactored and reformatted tests for clarity, style compliance, and improved thread safety test code.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates collection navigation key filtering so Alt/Ctrl-modified keystrokes don’t trigger collection navigation when kitty “associated text” provides a printable rune.

Changes:

  • Tighten DefaultCollectionNavigatorMatcher.IsCompatibleKey to reject keys when IsAlt or IsCtrl is set (even if AsRune is printable due to AssociatedText).
  • Add regression coverage for the “AssociatedText present + Alt/Ctrl modifier” scenario in CollectionNavigatorTests.
  • Minor test cleanups/formatting adjustments (unused locals, array formatting).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Tests/UnitTestsParallelizable/Text/CollectionNavigatorTests.cs Adds theory coverage ensuring Alt/Ctrl keys are rejected even when AssociatedText yields a valid rune; includes minor formatting/cleanup.
Terminal.Gui/Views/CollectionNavigation/DefaultCollectionNavigatorMatcher.cs Updates IsCompatibleKey to explicitly reject IsAlt/IsCtrl and reformats IsMatch.

@tig tig requested review from BDisp April 20, 2026 18:42
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.

2 participants