GNU bug report logs -
#38181
Actual height of mode-line not taken into account
Previous Next
Reported by: Jonas Bernoulli <jonas <at> bernoul.li>
Date: Tue, 12 Nov 2019 16:54:01 UTC
Severity: normal
Fixed in version 29.1
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 38181 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 15 Nov 2019 15:48:53 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 38181 <at> debbugs.gnu.org
>
> > From: Jonas Bernoulli <jonas <at> bernoul.li>
> > Date: Tue, 12 Nov 2019 17:52:59 +0100
> >
> > If the height of the mode-line is increased by inserting an image into
> > it, then that height is not taken into account in a buffer/window until
> > `redisplay' has been called at least once since the buffer was created.
>
> AFAIR, the mode line display is done lazily, because otherwise the
> mode line would flicker. When you change the face, that triggers a
> thorough redisplay, because any change in faces does that (it could
> mean many faces now have a different appearance). Adding an image to
> the mode line doesn't have that effect, which is why you need to force
> redisplay manually.
Btw, I was wrong above: enlarging the mode-line faces also causes a
similar problem. Try this slightly modified recipe:
(defun test-popup ()
(interactive)
(set-face-attribute 'mode-line nil :height 350)
(set-face-attribute 'mode-line-inactive nil :height 350)
(with-current-buffer (generate-new-buffer "*test*")
(save-excursion
(insert "one\ntwo\nthree\nfour\nfive"))
(let ((win (display-buffer (current-buffer)
'(display-buffer-in-side-window
(side . bottom)))))
(fit-window-to-buffer win))))
and you will see that the buffer *test* isn't shown in its entirety,
either.
I think fit-window-to-buffer relies on window's metrics (like the
number of lines in the text area) to be up to date, and that is only
true after a window was redisplayed once since changing the mode-line
height. Martin, is this correct?
This bug report was last modified 3 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.