gptel, gptel-curl: Make the gptel text-property non-sticky
gptel.el (gptel--insert-response): gptel-curl.el (gptel-curl--stream-insert-response): Make the `gptel' text-property rear-nonsticky so typing after it is recognized as part of the user prompt.
This commit is contained in:
parent
644fc1de2f
commit
61c0df5e19
2 changed files with 6 additions and 2 deletions
|
@ -199,7 +199,9 @@ See `gptel--url-get-response' for details."
|
|||
(when transformer
|
||||
(setq response (funcall transformer response)))
|
||||
|
||||
(put-text-property 0 (length response) 'gptel 'response response)
|
||||
(add-text-properties
|
||||
0 (length response) '(gptel response rear-nonsticky t)
|
||||
response)
|
||||
(goto-char tracking-marker)
|
||||
(insert response))))))
|
||||
|
||||
|
|
4
gptel.el
4
gptel.el
|
@ -624,7 +624,9 @@ See `gptel--url-get-response' for details."
|
|||
(setq response (gptel--transform-response
|
||||
response gptel-buffer))
|
||||
(save-excursion
|
||||
(put-text-property 0 (length response) 'gptel 'response response)
|
||||
(add-text-properties
|
||||
0 (length response) '(gptel response rear-nonsticky t)
|
||||
response)
|
||||
(with-current-buffer (marker-buffer start-marker)
|
||||
(goto-char start-marker)
|
||||
(run-hooks 'gptel-pre-response-hook)
|
||||
|
|
Loading…
Add table
Reference in a new issue