Subject: bug#38828: closed (Re: bug#38828: 26.3; Customized mode line breaks height of vertical scroll bar)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 03 Jan 2020 07:32:01 +0000

Your bug report

#38828: 26.3; Customized mode line breaks height of vertical scroll bar

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
38828: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38828
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#38828: 26.3; Customized mode line breaks height of vertical scroll bar
From: Eli Zaretskii <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Fri, 03 Jan 2020 09:31:33 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Thu, 02 Jan 2020 21:58:49 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> But I now think that we need to reset the mode_line_p flag even if we
> reallocate, because the rows which existed before reallocation are
> copied to the enlarged matrix, so that flag is kept.  So I think I
> will install the patch with that small change.

Done, and closing the bug.

Thanks for the test cases and the feedback.

Subject: 26.3; Customized mode line breaks height of vertical scroll bar
From: martin rudalics <[email-masked]>
To: Bug-Gnu-Emacs <[email-masked]>
Date: Tue, 31 Dec 2019 10:57:55 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

This bug can be reproduced here with Emacs 26 and current master.  The
mode line customization was provided by Jonas Bernoulli in Bug#38181.

With emacs -Q load the attached test-mode-line.el and hit F1.  This
should show the *scratch* window with an expanded mode line and a
normal scroll bar and a two line echo area showing "test-mode-line".

Now hit any other key.  This sould shrink the echo area and redisplay
the *scratch* window as before but "extends" the vertical scroll bar
into the mode line.

The reason for this behavior is that the vertical scroll bar height in
the first case is calculated from a window_box_height call where
ml_row->mode_line_p is set and thus ml_row->height is used.

In the second case ml_row->mode_line_p is not set and the value is
taken via estimate_mode_line_height which, given the specification
from 'test-mode-line', doesn't estimate the height well.

martin