branch: elpa/sly
commit ff008ce176a0a2af769e9d83987921ac750dfade
Author: João Távora <joaotav...@gmail.com>
Commit: João Távora <joaotav...@gmail.com>

    Fix #681: Fix try-completion call
    
    Can't just return the value of try-completion when using anything but
    the prefix style because that will just fail even though there are
    lots of possible completion when using the flex style.  Do what the
    code did before and return the pattern.
    
    This fix still maintains the intended behaviour for #636, which was
    fixed by:
    
        commit 0ebe705c08af7126e0b2ce66a33fc7d23864b193
        Author: João Távora <joaotav...@gmail.com>
        Date:   Sat Apr 13 16:45:24 2024 -0500
    
            Fix #636: Behave more like vanilla with sly-simple-completions
    
    * lib/sly-completion.el (sly--completion-function-wrapper): Tweak.
---
 lib/sly-completion.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/sly-completion.el b/lib/sly-completion.el
index 9a17a062b3..1e97b86972 100644
--- a/lib/sly-completion.el
+++ b/lib/sly-completion.el
@@ -259,7 +259,8 @@ ANNOTATION) describing each completion possibility."
           ;; all completions
           (`t (car (all)))
           ;; try completion
-          (`nil (try-completion pattern (car (all))))
+          (`nil (or (try-completion pattern (car (all)))
+                    pattern))
           (`(boundaries . ,thing)
            (completion-boundaries pattern (car (all)) pred thing))
           ;; boundaries or any other value

Reply via email to