branch: elpa/aidermacs
commit 117fc315af9ba11f9ce3d4ce01a2d1169b15023c
Author: Massimiliano Mirra <b...@hyperstruct.net>
Commit: Massimiliano Mirra <b...@hyperstruct.net>

    fix: don't switch to aider buffer before reading region
---
 aidermacs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aidermacs.el b/aidermacs.el
index a6d256f2a4..f213ac2501 100644
--- a/aidermacs.el
+++ b/aidermacs.el
@@ -589,8 +589,8 @@ If point is in a function, refactor that function."
 If region is active, explain that region.
 If point is in a function, explain that function."
   (interactive)
-  (aidermacs-add-current-file)
   (when-let ((command (aidermacs--form-prompt "/ask" "Explain")))
+    (aidermacs-add-current-file)
     (aidermacs--send-command command t)))
 
 ;;;###autoload

Reply via email to