Subject: Re: bug#38181: Actual height of mode-line not taken into account

From: martin rudalics <[email-masked]>
Date: Sun, 17 Nov 2019 09:55:47 +0100

> But I thought we'd established that mode-line height calculation is
 > not the culprit, the culprit is the fact that a window's height is not
 > recomputed when the mode-line height changes.  Did I misunderstand?

I don't think we contradicted each other's sayings here.  To
recapitulate what we found out so far:

(1) To operate correctly in the user's sense, 'fit-window-to-buffer'
     has to know the height of the mode line of the window it operates
     on as it will be shown by the next redisplay.

(2) When users or applications (maybe implicitly) change the mode line
     appearance, they have no generally established way to tell Emacs
     that this happened.  The display engine has to find out by herself
     but then it's already too late for telling 'fit-window-to-buffer'.

The question we yet have to resolve is now "only" _whether_ we can
safely recompute a window's height after redisplay detects that the
mode line height has changed.  This may easily trigger window change
functions which might easily change the mode line height again ...

martin