emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu 026ce5c 1/2: Minor highlighting workaround


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu 026ce5c 1/2: Minor highlighting workaround
Date: Sat, 22 May 2021 16:39:22 -0400 (EDT)

branch: externals/corfu
commit 026ce5c505d3f84fd298962e709b0ec7c210bc58
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Minor highlighting workaround
---
 corfu.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/corfu.el b/corfu.el
index ef403f7..2f58387 100644
--- a/corfu.el
+++ b/corfu.el
@@ -343,7 +343,12 @@ Set to nil in order to disable confirmation."
                 (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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]