Skip to content

Commit 9a2a5ea

Browse files
authored
Merge pull request #58 from bobrowadam/go-to-next-user-message-or-prompt
Make eca-chat-go-to-next-user-message go to user prompt
2 parents 4ea9e32 + 836d3ad commit 9a2a5ea

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)