mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
; Fix Icomplete error during candidate highlighting
* lisp/icomplete.el (icomplete-completions): Pass completion candidates through 'completion-lazy-hilit' before trimming common prefix, rather than after. https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00271.html
This commit is contained in:
parent
a8d5c5fd87
commit
3b07d33059
1 changed files with 3 additions and 3 deletions
|
|
@ -1057,7 +1057,8 @@ matches exist."
|
||||||
(setq determ (concat open-bracket "" close-bracket)))
|
(setq determ (concat open-bracket "" close-bracket)))
|
||||||
(while (and comps (not limit))
|
(while (and comps (not limit))
|
||||||
(setq comp
|
(setq comp
|
||||||
(if prefix-len (substring (car comps) prefix-len) (car comps))
|
(let ((cur (completion-lazy-hilit (car comps))))
|
||||||
|
(if prefix-len (substring cur prefix-len) cur))
|
||||||
comps (cdr comps))
|
comps (cdr comps))
|
||||||
(setq prospects-len
|
(setq prospects-len
|
||||||
(+ (string-width comp)
|
(+ (string-width comp)
|
||||||
|
|
@ -1066,8 +1067,7 @@ matches exist."
|
||||||
(if (< prospects-len prospects-max)
|
(if (< prospects-len prospects-max)
|
||||||
(push comp prospects)
|
(push comp prospects)
|
||||||
(setq limit t)))
|
(setq limit t)))
|
||||||
(setq prospects
|
(setq prospects (nreverse prospects))
|
||||||
(nreverse (mapcar #'completion-lazy-hilit prospects)))
|
|
||||||
;; Decorate first of the prospects.
|
;; Decorate first of the prospects.
|
||||||
(when prospects
|
(when prospects
|
||||||
(let ((first (copy-sequence (pop prospects))))
|
(let ((first (copy-sequence (pop prospects))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue