Skip to content

feat: add pi-coding-agent-input-previous-message command#165

Open
eengad wants to merge 1 commit intodnouri:masterfrom
eengad:feature/input-navigate-message
Open

feat: add pi-coding-agent-input-previous-message command#165
eengad wants to merge 1 commit intodnouri:masterfrom
eengad:feature/input-navigate-message

Conversation

@eengad
Copy link

@eengad eengad commented Mar 15, 2026

Navigate to the previous user message in the chat buffer while keeping focus in the input buffer.

Changes

  • pi-coding-agent.el: Set other-window-scroll-buffer to the chat buffer at session setup. This also gives users built-in C-M-v / C-M-S-v chat scrolling from the input buffer for free.
  • pi-coding-agent-ui.el: New pi-coding-agent-input-previous-message command that uses other-window-scroll-buffer to find the chat window, calls pi-coding-agent-previous-message there, and keeps focus in input.
  • test/pi-coding-agent-ui-test.el: 3 ERT tests (behavior, error case, scroll-buffer setup).

No keybinding included

Left unbound intentionally to avoid conflicts with frameworks like Doom. Do you have a preferred keybinding for this, or should it stay unbound and let users configure it themselves?

Navigate to the previous user message in the chat buffer while
keeping focus in the input buffer.  Uses other-window-scroll-buffer
(set at session setup) to find the chat window, which also enables
built-in C-M-v / C-M-S-v scrolling for free.

No default keybinding — users can bind it in their config.
@dnouri
Copy link
Owner

dnouri commented Mar 17, 2026

@eengad Do you wanna check out #172 and see if it works for your purposes?

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