diff options
| author | Eshel Yaron | 2024-06-14 19:49:21 +0200 |
|---|---|---|
| committer | Eshel Yaron | 2024-06-14 19:49:21 +0200 |
| commit | 3b07d33059150671d0af1cc7b51fa7c8cc4b4ea1 (patch) | |
| tree | ada4b1493bcd53256ddf6220c8b411c5905e6a5a | |
| parent | a8d5c5fd8789f28ddd040e497f03a988e5f0703c (diff) | |
| download | emacs-3b07d33059150671d0af1cc7b51fa7c8cc4b4ea1.tar.gz emacs-3b07d33059150671d0af1cc7b51fa7c8cc4b4ea1.zip | |
; 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
| -rw-r--r-- | lisp/icomplete.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index aa3c5680a7e..2ea5e36fa88 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -1057,7 +1057,8 @@ matches exist." | |||
| 1057 | (setq determ (concat open-bracket "" close-bracket))) | 1057 | (setq determ (concat open-bracket "" close-bracket))) |
| 1058 | (while (and comps (not limit)) | 1058 | (while (and comps (not limit)) |
| 1059 | (setq comp | 1059 | (setq comp |
| 1060 | (if prefix-len (substring (car comps) prefix-len) (car comps)) | 1060 | (let ((cur (completion-lazy-hilit (car comps)))) |
| 1061 | (if prefix-len (substring cur prefix-len) cur)) | ||
| 1061 | comps (cdr comps)) | 1062 | comps (cdr comps)) |
| 1062 | (setq prospects-len | 1063 | (setq prospects-len |
| 1063 | (+ (string-width comp) | 1064 | (+ (string-width comp) |
| @@ -1066,8 +1067,7 @@ matches exist." | |||
| 1066 | (if (< prospects-len prospects-max) | 1067 | (if (< prospects-len prospects-max) |
| 1067 | (push comp prospects) | 1068 | (push comp prospects) |
| 1068 | (setq limit t))) | 1069 | (setq limit t))) |
| 1069 | (setq prospects | 1070 | (setq prospects (nreverse prospects)) |
| 1070 | (nreverse (mapcar #'completion-lazy-hilit prospects))) | ||
| 1071 | ;; Decorate first of the prospects. | 1071 | ;; Decorate first of the prospects. |
| 1072 | (when prospects | 1072 | (when prospects |
| 1073 | (let ((first (copy-sequence (pop prospects)))) | 1073 | (let ((first (copy-sequence (pop prospects)))) |