[PR #955] [MERGED] feat(tui): add support for readline list nav (ctrl-p/ctrl-n) #9763

Closed
opened 2026-02-16 18:14:07 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/955
Author: @dkarter
Created: 7/13/2025
Status: Merged
Merged: 7/14/2025
Merged by: @adamdotdevin

Base: devHead: feat/add-support-for-readline-list-nav


📝 Commits (2)

  • 5df1c8a feat(tui): add support for readline list nav
  • bd3c71b refactor(tui): add ctrl+p and ctrl+n to up/down bindings

📊 Changes

2 files changed (+162 additions, -2 deletions)

View changed files

📝 packages/tui/internal/components/list/list.go (+2 -2)
packages/tui/internal/components/list/list_test.go (+160 -0)

📄 Description

Motivation

I'm so used to navigating lists like auto complete suggestions / file lists with ctrl-p and ctrl-n (Readline default mappings in macOS/Linux/emacs). I'm sure a lot of other people are used to it too (Claude Code also supports it FWIW).

Changes

  • Makes ctrl-n and ctrl-p work in lists like the / command completion and @ file completion.
  • Add tests for the list module

Demo

https://github.com/user-attachments/assets/965aa21c-5a61-44ed-b469-6b55fd794bf5


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/955 **Author:** [@dkarter](https://github.com/dkarter) **Created:** 7/13/2025 **Status:** ✅ Merged **Merged:** 7/14/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `feat/add-support-for-readline-list-nav` --- ### 📝 Commits (2) - [`5df1c8a`](https://github.com/anomalyco/opencode/commit/5df1c8a6e3ea968979a051c9f1901e562f5e6ee7) feat(tui): add support for readline list nav - [`bd3c71b`](https://github.com/anomalyco/opencode/commit/bd3c71b5b7a25a47baf1a3ee9b2aad263cfb802c) refactor(tui): add ctrl+p and ctrl+n to up/down bindings ### 📊 Changes **2 files changed** (+162 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/list/list.go` (+2 -2) ➕ `packages/tui/internal/components/list/list_test.go` (+160 -0) </details> ### 📄 Description # Motivation I'm so used to navigating lists like auto complete suggestions / file lists with `ctrl-p` and `ctrl-n` (Readline default mappings in macOS/Linux/emacs). I'm sure a lot of other people are used to it too (Claude Code also supports it FWIW). # Changes - Makes `ctrl-n` and `ctrl-p` work in lists like the `/` command completion and `@` file completion. - Add tests for the list module # Demo https://github.com/user-attachments/assets/965aa21c-5a61-44ed-b469-6b55fd794bf5 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:07 -05:00
yindo closed this issue 2026-02-16 18:14:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9763