Skip to content

Commit

Permalink
Fix minor bug with role-toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
daedsidog committed Jul 24, 2024
1 parent e9d947c commit 44618e8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gptel.el
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,13 @@ If a region is selected, modifies the region. Otherwise, modifies at the point.
;; sure to fill it with the role at the start of the region.
(dst-type (cl-loop for i from start while (< i end)
thereis (unless (eq type (get-text-property i 'gptel))
type)
(unless type
'query))
finally (cl-return (if (eq type 'response)
nil
'query
'response)))))
(put-text-property start end 'gptel dst-type)))))
(setq dst-type (if (eq dst-type 'query-placeholder) nil dst-type))
(put-text-property start end 'gptel dst-type)))))

(defun gptel--update-status (&optional msg face)
"Update status MSG in FACE."
Expand Down

0 comments on commit 44618e8

Please sign in to comment.