[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1155826: Speed up pcm completion styles for patternless special c
From: |
João Távora |
Subject: |
master 1155826: Speed up pcm completion styles for patternless special case |
Date: |
Wed, 25 Aug 2021 11:27:56 -0400 (EDT) |
branch: master
commit 1155826c9884b4a93ef52cf6cd6a9735a1c83951
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Speed up pcm completion styles for patternless special case
Fixes: bug#48841
* lisp/minibuffer.el (completion-flex-all-completions): Skip
completion-pcm--hilit-commonality if there's no pattern yet.
---
lisp/minibuffer.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 89d3a2a..68e4fa1 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3529,7 +3529,8 @@ string in COMPLETIONS. Return a deep copy of COMPLETIONS
where
each string is propertized with `completion-score', a number
between 0 and 1, and with faces `completions-common-part',
`completions-first-difference' in the relevant segments."
- (when completions
+ (cond
+ ((and completions (cl-loop for e in pattern thereis (stringp e)))
(let* ((re (completion-pcm--pattern->regex pattern 'group))
(point-idx (completion-pcm--pattern-point-idx pattern))
(case-fold-search completion-ignore-case)
@@ -3620,7 +3621,8 @@ between 0 and 1, and with faces `completions-common-part',
0 1 'completion-score
(/ score-numerator (* end (1+ score-denominator)) 1.0) str)))
str)
- completions))))
+ completions)))
+ (t completions)))
(defun completion-pcm--find-all-completions (string table pred point
&optional filter)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1155826: Speed up pcm completion styles for patternless special case,
João Távora <=