branch: externals/ivy
commit a42eb58b11b3ede7e9e846a64f30b9a6550d6e64
Author: Basil L. Contovounesios <[email protected]>
Commit: Basil L. Contovounesios <[email protected]>
* ivy.el (ivy-partial): Use completion-boundaries.
Also use ivy--pos-eol in place of line-end-position.
---
ivy.el | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/ivy.el b/ivy.el
index 7f50efdb6a..aa25ad7ce5 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1178,16 +1178,14 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
"Complete the minibuffer text as much as possible."
(interactive)
(if (ivy-state-dynamic-collection ivy-last)
- (let* ((bnd
- (ignore-errors
- (funcall
- (ivy-state-collection ivy-last)
- ivy-text nil (cons 'boundaries (buffer-substring (point)
(line-end-position))))))
+ (let* ((table (ivy-state-collection ivy-last))
+ (suf (buffer-substring (point) (ivy--pos-eol)))
+ (bnd (ignore-errors
+ (completion-boundaries ivy-text table nil suf)))
(beg (+ (minibuffer-prompt-end)
- (if bnd (cadr bnd) 0))))
+ (or (car bnd) 0))))
(delete-region beg (point-max))
- (insert
- (ivy-state-current ivy-last))
+ (insert (ivy-state-current ivy-last))
t)
(let* ((parts (or (ivy--split-spaces ivy-text) (list "")))
(tail (last parts))