emacs-diffs
[Top][All Lists]
Advanced

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

scratch/icomplete-lazy-highlight-attempt-2 74a7818: Fix scoring bug spur


From: João Távora
Subject: scratch/icomplete-lazy-highlight-attempt-2 74a7818: Fix scoring bug spuriously introduced in last change
Date: Sat, 14 Aug 2021 20:11:50 -0400 (EDT)

branch: scratch/icomplete-lazy-highlight-attempt-2
commit 74a7818fd4fbba839b6b5799957678123eb7fdb3
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Fix scoring bug spuriously introduced in last change
    
    * lisp/minibuffer.el (completion-pcm--hilit-commonality): Correctly
      initialize 'from'
---
 lisp/minibuffer.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index f460e9c..b8516ea 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3569,7 +3569,6 @@ between 0 and 1, and with faces `completions-common-part',
     (let* ((re (completion-pcm--pattern->regex pattern 'group))
            (point-idx (completion-pcm--pattern-point-idx pattern))
            (case-fold-search completion-ignore-case)
-           (from 0)
            last-md)
       (mapcar
        (lambda (str)
@@ -3581,6 +3580,7 @@ between 0 and 1, and with faces `completions-common-part',
          (let* ((pos (if point-idx (match-beginning point-idx) (match-end 0)))
                 (match-end (match-end 0))
                 (md (cddr (setq last-md (match-data t last-md))))
+                (from 0)
                 (end (length str))
                 ;; To understand how this works, consider these simple
                 ;; ascii diagrams showing how the pattern "foo"
@@ -3655,8 +3655,7 @@ between 0 and 1, and with faces `completions-common-part',
                (add-face-text-property
                 pos (1+ pos)
                 'completions-first-difference
-                nil str)
-             )
+                nil str))
            (unless (zerop (length str))
              (put-text-property
               0 1 'completion-score



reply via email to

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