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

    Prevent capf functions from moving point
---
 capf-autosuggest.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index 9327ac7..4d33eea 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -184,8 +184,10 @@ Otherwise, return nil."
              (condition-case nil
                  (catch catch-sym
                    (while-no-input
-                     (capf-autosuggest-orig-capf
-                      'capf-autosuggest-capf-functions)))
+                     ;; `ielm-complete-filename' may illegaly move point
+                     (save-excursion
+                       (capf-autosuggest-orig-capf
+                        'capf-autosuggest-capf-functions))))
                ((buffer-read-only quit) t)))
       (`(,beg ,end ,table . ,plist)
        (let* ((pred (plist-get plist :predicate))

Reply via email to