Skip to content

Allow the input buffer to navigate chat while keeping focus#172

Open
dnouri wants to merge 1 commit intomasterfrom
allow-input-buffer-to-navigate-chat
Open

Allow the input buffer to navigate chat while keeping focus#172
dnouri wants to merge 1 commit intomasterfrom
allow-input-buffer-to-navigate-chat

Conversation

@dnouri
Copy link
Owner

@dnouri dnouri commented Mar 17, 2026

This adds input-side navigation of user messages and keeps Emacs's ordinary other-window commands aimed at the right chat buffer, locally per session. It builds on #165, but makes the linkage local and completes the navigation.

When composing a prompt you often want to glance back at earlier
turns—scroll up, jump to a previous question—without losing your
place in the input buffer.  Until now that required switching windows
manually and switching back, which breaks flow.

Wire other-window-scroll-buffer (buffer-local in each input buffer)
to the linked chat buffer during session setup.  This gives C-M-v
and C-M-S-v for free, and lets other-window-for-scrolling resolve
correctly when multiple sessions share a frame.

Add pi-coding-agent-input-previous-message and
pi-coding-agent-input-next-message, which jump between user turns
in the linked chat while keeping focus in the input window.  No
default keybinding—users bind them in their own config.
@dnouri dnouri force-pushed the allow-input-buffer-to-navigate-chat branch from 8a8f37e to a017bd6 Compare March 20, 2026 14:58
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