GNU bug report logs - #61702
Minibuffer scrolling not working when long lines get truncated

Previous Next

Package: emacs;

Reported by: Johann Höchtl <johann.hoechtl <at> gmail.com>

Date: Wed, 22 Feb 2023 07:00:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Johann Höchtl <johann.hoechtl <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 61702 <at> debbugs.gnu.org
Subject: bug#61702: Minibuffer scrolling not working when long lines get truncated
Date: Thu, 2 Mar 2023 13:20:18 +0100
[Message part 1 (text/plain, inline)]
Sure that works. I am uncertain however if it is "the right thing" (r) to
do. Note, that in conjunction with eg. marginalia, the information to an
entry can become quite long, hopefully because it provides helpful
information. This added information would no longer be visible and I don't
know how to scroll to the left / right to make it visible.

Additionally, if you press two times <TAB> <TAB>
(requiring  '(completion-auto-select 'second-tab) to be set) you get a
different (arguably better) scrolling behaviour, breaking long lines while
retaining the whole information. Similar functionality, different code?

Sidenote: fido-vertical mode makes little sense in conjunction with
(completion-auto-select 'second-tab) but I get what I ask for.

Am Do., 2. März 2023 um 12:57 Uhr schrieb João Távora <joaotavora <at> gmail.com
>:

> On Thu, Mar 2, 2023 at 11:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Johann Höchtl <johann.hoechtl <at> gmail.com>
> > > Date: Thu, 23 Feb 2023 08:12:09 +0100
> > > Cc: 61702 <at> debbugs.gnu.org
> > >
> > > emacs -Q
> > > M-x fido-vertical-mode
> > > M-x <consta> <-- any search term to narrow down the potential
> completions, in this case 12 items remain
> > > matching
> > > narrow the whole emacs window so the search results have to "break"
> because of long lines
> > > <down> <down> ...
> > > The highlighted active line remains visible until the last items, than
> the active line becomes invisible
> >
> > Thanks.
> >
> > It looks like the code in icomplete--render-vertical implicitly
> > assumes that every candidate takes just one screen line, which is
> > false in your scenario.  A workaround is to set truncate-lines non-nil
> > in the minibuffer.
> >
> > João, can you take a look, please?
>
> I'll take a better look later, but I can say that that truncate-lines
> idea sounds very sensible.  Johann can you try this patch?
>
> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> index 014f38b2024..4e85e20fddb 100644
> --- a/lisp/icomplete.el
> +++ b/lisp/icomplete.el
> @@ -644,6 +644,7 @@ icomplete--vertical-minibuffer-setup
>    (setq-local icomplete-hide-common-prefix nil
>                ;; Ask `icomplete-completions' to return enough
> completions candidates.
>                icomplete-prospects-height 25
> +              truncate-lines t
>                redisplay-adhoc-scroll-in-resize-mini-windows nil))
>
>  ;;;###autoload
>
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.