GNU bug report logs -
#18195
24.3.92; window-screen-lines is not accurate
Previous Next
Reported by: Dmitry <dgutov <at> yandex.ru>
Date: Tue, 5 Aug 2014 02:01:01 UTC
Severity: normal
Found in version 24.3.92
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Have you tried Company?
No.
> This issue is about completion popup, which displays completions in the current buffer and window, in a rectangle rendered using an overlay. There are screenshots in that issue thread.
>
> Before the popup is rendered, we need to determine how much of it would fit below the current line, and if there's not enough space, we render it above the current line.
Aha... Could you try whether `window-text-pixel-size' could be used for
that? IIUC you'd have to call it twice: Once for calculating how much
space you need and once for how much space is left below the current
line. `window-text-height' with PIXELWISE t should give you the overall
height of the window.
> Even if the buffer is shorter than the window, we can temporarily pad it, so when calculating the height of the window, we need to take the whole of it into account. That's why `count-screen-line' doesn't seem like a good approach either.
If things like line spacing are involved you really should calculate
pixelwise.
martin
This bug report was last modified 10 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.