gptel: Fix gptel-end-of-response
* gptel.el (gptel-end-of-response): Handle non-interactive case where one of the function arguments can be nil. Fix #262.
This commit is contained in:
parent
5dcbf40066
commit
22f7043c32
1 changed files with 1 additions and 0 deletions
1
gptel.el
1
gptel.el
|
@ -557,6 +557,7 @@ Note: This will move the cursor."
|
||||||
"Move point to the end of the LLM response ARG times."
|
"Move point to the end of the LLM response ARG times."
|
||||||
(interactive (list nil nil
|
(interactive (list nil nil
|
||||||
(prefix-numeric-value current-prefix-arg)))
|
(prefix-numeric-value current-prefix-arg)))
|
||||||
|
(unless arg (setq arg 1))
|
||||||
(let ((search (if (> arg 0)
|
(let ((search (if (> arg 0)
|
||||||
#'text-property-search-forward
|
#'text-property-search-forward
|
||||||
#'text-property-search-backward)))
|
#'text-property-search-backward)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue