Skip to content

feat(ui): add <C-p>/<C-n> history navigation to question dialog input - #483

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:feat/inline-input-history
Aug 18, 2026
Merged

feat(ui): add <C-p>/<C-n> history navigation to question dialog input#483
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:feat/inline-input-history

Conversation

@phanen

@phanen phanen commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem: the 'Type your own answer' inline input box did not inherit
any input history, so users could not scroll back through prior answers
the way vim.fn.input() allows with <C-p>/<C-n>.

Solution: bind insert-mode <C-p>/<C-n> in inline_input.lua that
walk vim's built-in input history via vim.fn.histget/histadd,
sharing the same history list as vim.fn.input() itself.

Problem: the 'Type your own answer' inline input box did not inherit
any input history, so users could not scroll back through prior answers
the way `vim.fn.input()` allows with `<C-p>`/`<C-n>`.

Solution: bind insert-mode `<C-p>`/`<C-n>` in `inline_input.lua` that
walk vim's built-in `input` history via `vim.fn.histget`/`histadd`,
sharing the same history list as `vim.fn.input()` itself.
@sudo-tee

Copy link
Copy Markdown
Owner

Thanks for the PR.

This is a great addition

@sudo-tee
sudo-tee merged commit bafc8e7 into sudo-tee:main Aug 18, 2026
5 checks passed
jugarpeupv pushed a commit to jugarpeupv/opencode.nvim that referenced this pull request Aug 22, 2026
…sudo-tee#483)

Problem: the 'Type your own answer' inline input box did not inherit
any input history, so users could not scroll back through prior answers
the way `vim.fn.input()` allows with `<C-p>`/`<C-n>`.

Solution: bind insert-mode `<C-p>`/`<C-n>` in `inline_input.lua` that
walk vim's built-in `input` history via `vim.fn.histget`/`histadd`,
sharing the same history list as `vim.fn.input()` itself.
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