bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#77546: Acknowledgement (Regression in defaults: Re: Enhance 'icomple


From: Rahul Martim Juliato
Subject: bug#77546: Acknowledgement (Regression in defaults: Re: Enhance 'icomplete-vertical-mode' customization options.)
Date: Sat, 05 Apr 2025 12:39:25 -0300
User-agent: Gnus/5.13 (Gnus v5.13)

João Távora <joaotavora@gmail.com> writes:

> This seems to be just a bug in the implementation.  This patch
> fixes it (and fixes some odd cl-loop usage as well):
>
>

Nice catch!

Thanks for this patch João, I agree with you the icomplete enhancements
should not touch defaults.

>        (concat (propertize icomplete-vertical-selected-prefix-indicator
>                            'face
> 'icomplete-vertical-selected-prefix-indicator-face)
>                comp)

It looks like this got wrapped by the mail client, just so anyone else
can copy/paste your diff:


diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index d0cc5674ba7..1ccfcc3edf4 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -927,8 +927,7 @@ icomplete-vertical--ensure-visible-lines-inside-buffer

 (defun icomplete-vertical--add-indicator-to-selected (comp)
   "Add indicators to the selected/unselected COMP completions."
-  (if (and icomplete-vertical-render-prefix-indicator
-           (get-text-property 0 'icomplete-selected comp))
+  (if (get-text-property 0 'icomplete-selected comp)
       (concat (propertize icomplete-vertical-selected-prefix-indicator
                           'face 
'icomplete-vertical-selected-prefix-indicator-face)
               comp)
@@ -1012,8 +1011,11 @@ icomplete--render-vertical
     ;; Serialize completions and section titles into a list
     ;; of lines to render
     (cl-loop
-     for (comp prefix suffix section) in tuples
-     do (setq comp (icomplete-vertical--add-indicator-to-selected comp))
+     for (comp-no-indicator prefix suffix section) in tuples
+     for comp =
+     (if icomplete-vertical-render-prefix-indicator
+         (icomplete-vertical--add-indicator-to-selected comp-no-indicator)
+       comp-no-indicator)
      when section
      collect (propertize section 'face 'icomplete-section) into lines-aux
      and count 1 into nsections-aux


I just tested it and can confirm that the issue you described is fixed,
and the new features still seem to be working as expected.

Could you clarify something else for me?

What’s the usual protocol here? Do we wait for a maintainer to pick up
the bug and merge the fix?

Thanks again!






reply via email to

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