branch: externals/vertico
commit 93f4b55b3bfe7786c6798e6d77488fc22427e7ae
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    vertico-directory-enter: Check vertico--base for path completion
    
    vertico-directory-enter should only insert the directory for step-wise file 
path
    completion ala find-file. In all other cases the selected directory should 
be
    opened.
    
    Fix #251
---
 extensions/vertico-directory.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/extensions/vertico-directory.el b/extensions/vertico-directory.el
index b14d7f80bd..220a892b69 100644
--- a/extensions/vertico-directory.el
+++ b/extensions/vertico-directory.el
@@ -49,6 +49,8 @@
              (or (string-suffix-p "/" cand)
                  (and (vertico--remote-p cand)
                       (string-suffix-p ":" cand))))
+           ;; Check vertico--base for stepwise file path completion
+           (not (equal vertico--base ""))
            (eq 'file (vertico--metadata-get 'category)))
       (vertico-insert)
     (vertico-exit)))

Reply via email to