From 836d3adc6255df9d42a7044abed3dfbeae6562dd Mon Sep 17 00:00:00 2001 From: Adam Bobrow Date: Sat, 4 Oct 2025 18:14:18 +0300 Subject: [PATCH] Make eca-chat-go-to-next-user-message go to user prompt This change makes the user prompt area the last goto point when jumping between user's messages. We might want to implement that for `eca-chat-go-to-next-expandable-block` later if we find that useful. --- eca-chat.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eca-chat.el b/eca-chat.el index a57b7a6..72a4a1f 100644 --- a/eca-chat.el +++ b/eca-chat.el @@ -1912,10 +1912,12 @@ string." ;;;###autoload (defun eca-chat-go-to-next-user-message () - "Go to the next user message from point." + "Go to the next user message from point. +If there is no next user message, go to the chat prompt line." (interactive) (eca-assert-session-running (eca-session)) - (eca-chat--go-to-overlay 'eca-chat--user-message-id (1+ (point)) (point-max) t)) + (unless (eca-chat--go-to-overlay 'eca-chat--user-message-id (1+ (point)) (point-max) t) + (goto-char (eca-chat--prompt-field-start-point)))) ;;;###autoload (defun eca-chat-go-to-prev-expandable-block ()