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

From: Jonas Bernoulli <[email-masked]>
Date: Sat, 16 Nov 2019 00:51:19 +0100

Eli Zaretskii <[email-masked]> writes:

> Why the need to use advising?  Your recipe shows that calling
> redisplay before fit-window-to-buffer also solves the problem.  Can't
> you do something like that only when you add such tall images to the
> mode line?

This is about packages like powerline, spaceline, doom-modeline and my
moody.  These packages add images to the global mode-line-format to make
them prettier.  These packages do not create any buffers of their own
and they never call fit-window-to-buffer themselves, but whenever that
function is called for a new buffer redisplay has to be run first, so
the advice is needed.

> An alternative would be to scale the image so that it doesn't enlarge
> the mode line, btw.  Is that possible in your use cases?

No because enlarging the mode-line is one of the things I did in order
to make it prettier (imo).  It's a goal not a means or side-effect.

You can see a screenshot on https://github.com/tarsius/moody.
Many other "mode-line prettifiers" also increase its height.