gptel-transient: No pre-fill when reading from minibuffer
* gptel-transient.el (gptel--suffix-send): Don't pre-fill the minibuffer prompt with the current line when reading the query from the minibuffer. (If the region is active, it is used as the initial contents -- this behavior is unchanged.)
This commit is contained in:
parent
34a52aa047
commit
12e00cbd09
1 changed files with 3 additions and 4 deletions
|
@ -599,10 +599,9 @@ Or in an extended conversation:
|
|||
((member "m" args)
|
||||
(read-string
|
||||
(format "Ask %s: " (gptel-backend-name gptel-backend))
|
||||
(apply #'buffer-substring-no-properties
|
||||
(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list (line-beginning-position) (line-end-position))))))
|
||||
(and (use-region-p)
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning) (region-end)))))
|
||||
((member "y" args)
|
||||
(unless (car-safe kill-ring)
|
||||
(user-error "`kill-ring' is empty! Nothing to send"))
|
||||
|
|
Loading…
Add table
Reference in a new issue