summaryrefslogtreecommitdiff
path: root/cape.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-12-08 13:38:17 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-12-08 13:38:46 +0100
commit6ddd50e7b756c28a0d49b38c1fe2e1d17aa309bb (patch)
tree1f1516c0bed797512f0b73ddaafdc15be0cfb647 /cape.el
parentaae065830c26cbd9e21ac7205dff0dfec423392b (diff)
Improve prefix setting of file capf
Diffstat (limited to 'cape.el')
-rw-r--r--cape.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/cape.el b/cape.el
index 67e6fef..ebedf8b 100644
--- a/cape.el
+++ b/cape.el
@@ -412,7 +412,8 @@ If INTERACTIVE is nil the function acts like a capf."
(when (or (not cape-file-directory-must-exist)
(and (string-match-p "/" file) (file-exists-p (file-name-directory file))))
`(,(car bounds) ,(cdr bounds) ,#'read-file-name-internal
- :company-prefix-length ,(and (not (equal file "/")) (string-suffix-p "/" file))
+ ,@(and (not (equal file "/")) (string-suffix-p "/" file)
+ '(:company-prefix-length t))
:exclusive no ,@cape--file-properties)))))
;;;;; cape-symbol