GNU bug report logs - #38181
Actual height of mode-line not taken into account

Previous Next

Package: emacs;

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 #83 received at 38181 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: jonas <at> bernoul.li, 38181 <at> debbugs.gnu.org
Subject: Re: bug#38181: Actual height of mode-line not taken into account
Date: Sun, 17 Nov 2019 19:22:54 +0200
> Cc: jonas <at> bernoul.li, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Sun, 17 Nov 2019 10:01:44 +0100
> 
>  > Maybe fit-window-to-buffer should set some hook, which redisplay
>  > should call if it finds out that the mode-line height changed?
> 
> Maybe a two-bits sticky bit-field in the window structure called
> refit_window_to_buffer.  The Lisp interface to it is a function called
> 'refit-window-to-buffer' setting refit_window_to_buffer to 1 if it is
> zero.  'fit-window-to-buffer' always calls 'refit-window-to-buffer'.

I'd prefer a hook, because the problem probably isn't limited to
fit-window-to-buffer.

Wait, don't we already call window-size-change-functions in this case?
If not, would it help if we did?

> display_mode_lines sets refit_window_to_buffer to 2 provided it is 1
> and the mode line height of this window has changed.

The detection of the change in mode-line height is outside
display_mode_lines, see the snippet I posted up-thread.

> The display engine eventually calls 'fit-window-to-buffer' for all
> windows that have refit_window_to_buffer equal 2 and sets it to 3.

We need to figure out the "eventually" part.  It should happen after
the windows have their dimensions updated due to the mode-line
changes.  Do you know where this happens?

> This might be tricky for windows stored in configurations and states.

Why tricky?  A stored configuration shouldn't be affected by any
changes after it's tored, no?

> And always remember the fact that in one and the same display cycle
> 'fit-window-to-buffer' may have been called for two windows above each
> other.

Mmm... actually, it could be that we cannot resize windows during
redisplay at all.  See, for example, how resize_mini_window does its
tricky job.  We may need to call this outside of redisplay.




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.