branch: externals/capf-autosuggest
commit 8f5d5fa619319b98fd7c6792c9d7038cd43fbae0
Author: jakanakaevangeli <[email protected]>
Commit: jakanakaevangeli <[email protected]>

    Fix last change
---
 capf-autosuggest.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index 4c3917e..0968e6b 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -409,15 +409,15 @@ suggestion and send input."
 
     (define-key map [remap next-line]
       (list 'menu-item "" nil :filter
-            (lambda (_cmd)
+            (lambda (cmd)
               (and capf-autosuggest-dwim-next-line
-                   (looking-at-p "[^\n]*\n?\\'"))
-              (when-let*
-                  ((cmd (cond
-                         ((derived-mode-p 'comint-mode) #'comint-send-input)
-                         ((derived-mode-p 'eshell-mode) #'eshell-send-input)
-                         ((minibufferp) #'exit-minibuffer))))
-                (capf-autosuggest--accept-and-remapping cmd)))))
+                   (looking-at-p "[^\n]*\n?\\'")
+                   (setq cmd
+                         (cond
+                          ((derived-mode-p 'comint-mode) #'comint-send-input)
+                          ((derived-mode-p 'eshell-mode) #'eshell-send-input)
+                          ((minibufferp) #'exit-minibuffer)))
+                   (capf-autosuggest--accept-and-remapping cmd)))))
     (define-key map [remap comint-next-prompt]
       (list 'menu-item "" #'comint-send-input :filter
             (lambda (cmd)

Reply via email to