Skip to content

Commit 836d3ad

Browse files
committed
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.
1 parent 4ea9e32 commit 836d3ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

eca-chat.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,10 +1912,12 @@ string."
19121912

19131913
;;;###autoload
19141914
(defun eca-chat-go-to-next-user-message ()
1915-
"Go to the next user message from point."
1915+
"Go to the next user message from point.
1916+
If there is no next user message, go to the chat prompt line."
19161917
(interactive)
19171918
(eca-assert-session-running (eca-session))
1918-
(eca-chat--go-to-overlay 'eca-chat--user-message-id (1+ (point)) (point-max) t))
1919+
(unless (eca-chat--go-to-overlay 'eca-chat--user-message-id (1+ (point)) (point-max) t)
1920+
(goto-char (eca-chat--prompt-field-start-point))))
19191921

19201922
;;;###autoload
19211923
(defun eca-chat-go-to-prev-expandable-block ()

0 commit comments

Comments
 (0)