branch: elpa/aidermacs
commit c6ea77c46549fc9184d98d4fb122ce59113d6671
Author: tninja <tni...@gmail.com>
Commit: tninja <tni...@gmail.com>

    refactor(aider): relocate multi-line processing function
---
 aider.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/aider.el b/aider.el
index 5f1cbe7730..1a7d109d97 100644
--- a/aider.el
+++ b/aider.el
@@ -52,15 +52,6 @@ When nil, use standard `display-buffer' behavior."
                                    ("^\x2500+" 0 '(face nil display (space 
:width 2))))
   "Font lock keywords for aider buffer.")
 
-(defun aider--process-message-if-multi-line (str)
-  "Entering multi-line chat messages
-https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages
-If STR contains newlines, wrap it in {aider.el\\nstr\\naider.el}.
-Otherwise return STR unchanged."
-  (if (string-match-p "\n" str)
-      (format "{aider\n%s\naider}" str)
-    str))
-
 ;;;###autoload
 (defun aider-plain-read-string (prompt &optional initial-input)
   "Read a string from the user with PROMPT and optional INITIAL-INPUT.
@@ -265,6 +256,15 @@ Ensure proper highlighting of the text in the buffer."
         ;; (message "Sent command to aider buffer: %s" chunk)
         (setq pos end-pos)))))
 
+(defun aider--process-message-if-multi-line (str)
+  "Entering multi-line chat messages
+https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages
+If STR contains newlines, wrap it in {aider\\nstr\\naider}.
+Otherwise return STR unchanged."
+  (if (string-match-p "\n" str)
+      (format "{aider\n%s\naider}" str)
+    str))
+
 ;; Shared helper function to send commands to corresponding aider buffer
 (defun aider--send-command (command &optional switch-to-buffer)
   "Send COMMAND to the corresponding aider comint buffer after performing 
necessary checks.

Reply via email to