On Sun, Sep 8, 2024 at 2:28 PM Daniel Mendler <m...@daniel-mendler.de> wrote: > > Juri Linkov <j...@linkov.net> writes: > > > Maybe Daniel (Cc:ed) could help us understand > > why 'completion--insert-horizontal' doesn't display groups. > > If I remember correctly, I didn't add group titles to the horizontal > formatting in order to keep the display more dense, with the goal of > fitting as many candidates on the screen as possible. In my Vertico > package, I am using a similar strategy, where group titles are not shown > for the flat and grid display modes. In any case, there shouldn't be a > technical reason which prevents us from showing the titles also for the > horizontal display.
It appears to be this line in `completion--insert-horizontal` which is causing all the trouble. When I comment that out, I get the output I'm expecting. Looking at the difference between `completion--insert-horizontal` and `completion--insert-vertical`, that check happens after the check for `group-fun`. Maybe `completion--insert-horizontal` should be restructured similarly? ```elisp (unless (equal last-string str) ; Remove (consecutive) duplicates. ```