From 22f7043c328570fb921fd6a38e767eeffe4a7986 Mon Sep 17 00:00:00 2001 From: Karthik Chikmagalur Date: Tue, 19 Mar 2024 17:39:13 -0700 Subject: [PATCH] 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. --- gptel.el | 1 + 1 file changed, 1 insertion(+) diff --git a/gptel.el b/gptel.el index a3da9fd..7587082 100644 --- a/gptel.el +++ b/gptel.el @@ -557,6 +557,7 @@ Note: This will move the cursor." "Move point to the end of the LLM response ARG times." (interactive (list nil nil (prefix-numeric-value current-prefix-arg))) + (unless arg (setq arg 1)) (let ((search (if (> arg 0) #'text-property-search-forward #'text-property-search-backward)))