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:11:28 +0000
User-agent: Alpine 2.22 (NEB 394 2020-01-19)


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.

Not sure what should be canonical here. AFAIU, just using window-text-pixel-size and comparing with the window dimensions is all that's needed.


Just calculating the window dimensions is already a nontrivial task. There are two cases: a miniwindow-only frame, and the "normal" case. In the first case you need to use frame-height, and multiply it with the pixel height of the "default" face. In the second case you can get the maximal dimensions with max-mini-window-height, and multiply it by the pixel height of the "default" face. But you cannot just multiply max-mini-window-height by that height, that would be too easy. There are again two cases: either max-mini-window-height is an integer, in which case you can just do that multiplication, or it is a floating point number, in which case you have to multiply that number by frame-height and truncate it, and multiply the resulting number by the pixel height of the "default" face...



reply via email to

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