[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 6d0963c 1/6: Work around `completion-boundaries
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico 6d0963c 1/6: Work around `completion-boundaries' bug in Emacs 27.1 |
Date: |
Sat, 10 Apr 2021 05:55:00 -0400 (EDT) |
branch: externals/vertico
commit 6d0963c6abeaa3520500bddfd24ce932cbc627a6
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Work around `completion-boundaries' bug in Emacs 27.1
See https://github.com/minad/marginalia/issues/67
---
vertico.el | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/vertico.el b/vertico.el
index 6df65fc..7d38ca7 100644
--- a/vertico.el
+++ b/vertico.el
@@ -404,10 +404,17 @@
(let* ((metadata (completion--field-metadata (minibuffer-prompt-end)))
(content (minibuffer-contents-no-properties))
(pt (- (point) (minibuffer-prompt-end)))
- (bounds (completion-boundaries (substring content 0 pt)
- minibuffer-completion-table
- minibuffer-completion-predicate
- (substring content pt))))
+ (before (substring content 0 pt))
+ (after (substring content pt))
+ ;; BUG: `completion-boundaries` fails for `partial-completion`
+ ;; if the cursor is moved between the slashes of "~//".
+ ;; See also marginalia.el
+ (bounds (or (condition-case nil
+ (completion-boundaries before
+ minibuffer-completion-table
+ minibuffer-completion-predicate
+ after)
+ (t (cons 0 (length after)))))))
(unless (equal vertico--input (cons content bounds))
(vertico--update-candidates content bounds metadata))
(vertico--display-candidates (vertico--format-candidates content bounds
metadata))
- [elpa] externals/vertico updated (f48679b -> 5aaa5f6), Protesilaos Stavrou, 2021/04/10
- [elpa] externals/vertico 6d0963c 1/6: Work around `completion-boundaries' bug in Emacs 27.1,
Protesilaos Stavrou <=
- [elpa] externals/vertico d8d4aad 3/6: Determine the completion metadata correctly, Protesilaos Stavrou, 2021/04/10
- [elpa] externals/vertico c72e8de 2/6: Ensure that pt is never negative, Protesilaos Stavrou, 2021/04/10
- [elpa] externals/vertico 5511a75 4/6: Add link to upstream bug, Protesilaos Stavrou, 2021/04/10
- [elpa] externals/vertico c3c5614 5/6: README: Mention initials completion style, Protesilaos Stavrou, 2021/04/10
- [elpa] externals/vertico 5aaa5f6 6/6: Version 0.3, Protesilaos Stavrou, 2021/04/10