[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico e7c230b 2/4: Minor highlighting workaround
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico e7c230b 2/4: Minor highlighting workaround |
Date: |
Sat, 22 May 2021 16:38:55 -0400 (EDT) |
branch: externals/vertico
commit e7c230be7cfa937b2375f7d049cf8a683cecca67
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Minor highlighting workaround
---
vertico.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vertico.el b/vertico.el
index 20ee817..83f753d 100644
--- a/vertico.el
+++ b/vertico.el
@@ -235,7 +235,12 @@
(and cands (nconc cands base))))
((symbol-function #'completion-pcm--hilit-commonality)
(lambda (pattern cands)
- (setq hl (lambda (x) (completion-pcm--hilit-commonality
pattern x)))
+ (setq hl (lambda (x)
+ ;; `completion-pcm--hilit-commonality' sometimes
throws an internal error
+ ;; for example when entering "/sudo:://u".
+ (condition-case nil
+ (completion-pcm--hilit-commonality pattern x)
+ (t x))))
cands))
((symbol-function #'orderless-highlight-matches)
(lambda (pattern cands)