emacs-devel
[Top][All Lists]
Advanced

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

Re: select yank via completion


From: Eli Zaretskii
Subject: Re: select yank via completion
Date: Thu, 26 Nov 2020 11:57:33 +0200
User-agent: K-9 Mail for Android

On November 26, 2020 11:26:13 AM GMT+02:00, Juri Linkov <juri@linkov.net> wrote:
> >>>>>> +                             (when (> (length s) (- 40 b))
> >>>>>> +                               (add-text-properties
> >>>>>> +                                (min (+ b 40) (length s))
> (length s)
> >>>>>> +                                `(display ,ellipsis) s))
> >>>>>
> >>>>> Any chance this threshold can be configurable?  I don't mind
> completions
> >>>>> as wide as or wider than the frame in Ivy's minibuffer.
> >>
> >> As an intermediate fix, now code at least doesn't contain an
> arbitrary
> >> constant, but defaults to the frame width.
> >
> > Thanks, but don't scroll bars, fringes, etc. have to be subtracted
> from
> > the frame width?
> 
> Is this the correct formula?
> 
> (floor (- (frame-inner-width)
>           (frame-internal-border-width)
>           (frame-fringe-width)
>           (frame-scroll-bar-width))
>        (frame-char-width))

I think you want simply to call frame-text-cols.



reply via email to

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