emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/icomplete-vertical


From: Gregory Heytings
Subject: Re: feature/icomplete-vertical
Date: Mon, 05 Oct 2020 11:02:17 +0000
User-agent: Alpine 2.22 (NEB 394 2020-01-19)


If an application wants to fit the buffer in the window, or display some hint about truncation, it's the application's business to do these things.

I guess you can argue that, but this implies there are ways to predict truncation (since being notified of it seems to be what you're opposed to).

So how is the application to know if its n lines, of lengths L = {l1, ..., li, ..., ln}, it wants to display (not necessarily by buffer insertion) in the mini-window need truncation and starting in which line? Does it need to perform calculations with max-mini-window-height? If so, is there a "canonical" way to perform these calculations that accounts for fontsizes, frame widths, etc? To be clear, I find this information useful for other domais, notably designing the way the Eldoc should show information in the echo area.


This is feasible, but IMHO very (and needlessly) difficult. Basically you need to work with pixel dimensions, and recalculate everything manually: first calculate the (maximal) size of the miniwindow (given the user preferences, in particular max-mini-window-height), then calculate the size of its contents with window-text-pixel-size. You should add one character (or line) at at time, and recalculate the new size each time.



reply via email to

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