branch: elpa/aidermacs
commit 1389589e61e6d53b02e969dcaf56614af821fa37
Author: Kang Tu <kang...@apple.com>
Commit: Kang Tu (aider) <kang...@apple.com>

    refactor: simplify aider-read-string function by removing unnecessary 
newline handling
---
 aider.el | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/aider.el b/aider.el
index acb07917e8..94ab272b97 100644
--- a/aider.el
+++ b/aider.el
@@ -26,12 +26,7 @@
 (defun aider-read-string (prompt &optional initial-input)
   "Read a string from the user with PROMPT and optional INITIAL-INPUT.
 This function can be customized or redefined by the user."
-  (let ((input (read-string prompt initial-input)))
-    ;; Replace all newline characters with spaces, except for the last one
-    (setq input (replace-regexp-in-string "\n" " " input))
-    (when (string-match-p "\n" input)
-      (setq input (concat (string-trim input) "\n"))) ;; Add a newline at the 
end
-    input))
+  (read-string prompt initial-input))
 
 ;; Transient menu for Aider commands
 (transient-define-prefix aider-transient-menu ()

Reply via email to