Skip to content

Fixes #5331. ListView.KeystrokeNavigator = null disables navigation - #5332

Merged
tig merged 9 commits into
developfrom
fix/listview_keystroke_nav_null
May 18, 2026
Merged

tig merged 9 commits into
developfrom
fix/listview_keystroke_nav_null

Conversation

@tig

@tig tig commented May 18, 2026

Copy link
Copy Markdown
Member

Adds a unit test that verifies setting ListView.KeystrokeNavigator = null disables keystroke navigation, as documented in the property's XML doc comment.

The test:

  1. Confirms default keystroke navigation works (typing 'B' selects 'bat')
  2. Sets KeystrokeNavigator = null
  3. Verifies key events are no longer consumed and selection remains unchanged

Closes #5331

@tig
tig requested a review from BDisp May 18, 2026 02:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08f61e59ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Terminal.Gui/Views/ListView/ListView.cs Outdated
Convert KeystrokeNavigator from auto-property to one with a custom
setter that automatically syncs the navigator's Collection with the
current Source. This prevents a runtime issue where replacing the
navigator after Source was set would leave the new navigator with
an uninitialized collection.

Add test proving reassignment after Source works correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tig tig changed the title Fixes #5331. Add test proving ListView.KeystrokeNavigator = null disables navigation Fixes #5331. ListView.KeystrokeNavigator = null disables navigation May 18, 2026
@tig
tig merged commit c1f88ce into develop May 18, 2026
13 checks passed
@tig
tig deleted the fix/listview_keystroke_nav_null branch May 18, 2026 12:14
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.

ListView.KeystrokeNavigator should be nullable

2 participants