Skip to content

fix(cli): wrap cursor navigation in selector panels#895

Open
kev1n77 wants to merge 2 commits into
GCWing:mainfrom
kev1n77:cli/tui
Open

fix(cli): wrap cursor navigation in selector panels#895
kev1n77 wants to merge 2 commits into
GCWing:mainfrom
kev1n77:cli/tui

Conversation

@kev1n77
Copy link
Copy Markdown
Collaborator

@kev1n77 kev1n77 commented May 26, 2026

Change move_up/move_down in all CLI selector panels to use modulo-based wrapping instead of saturating clamp, so pressing Down on the last item jumps to the first and pressing Up on the first item jumps to the last.

Previously, all selectors used saturating_sub(1) for up and (idx + 1).min(len - 1) for down, which clamped at boundaries. This matches the wrapping behavior already implemented in question.rs.

Affected panels

  • agent selector
  • command menu
  • command palette (Ctrl+P)
  • MCP server selector
  • model selector
  • provider selector
  • session selector
  • skill selector
  • subagent selector
  • theme selector

kev1n77 added 2 commits May 26, 2026 16:23
Change move_up/move_down in all CLI selector panels to use modulo-based
wrapping instead of saturating clamp, so pressing Down on the last item
jumps to the first and pressing Up on the first item jumps to the last.

Affected panels: agent, command_menu, command_palette, mcp, model,
provider, session, skill, subagent, theme.
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