unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38828: 26.3; Customized mode line breaks height of vertical scroll bar
@ 2019-12-31  9:57 martin rudalics
  2019-12-31 16:05 ` martin rudalics
  2020-01-01 16:10 ` Eli Zaretskii
  0 siblings, 2 replies; 21+ messages in thread
From: martin rudalics @ 2019-12-31  9:57 UTC (permalink / raw)
  To: 38828

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

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

[-- Attachment #2: test-mode-line.el --]
[-- Type: text/plain, Size: 914 bytes --]

(defun test-mode-line ()
  (interactive)
  (setq
   mode-line-format
   (cons (propertize " " 'display
                     (create-image "/* XPM */ static char * image[] = {
\"3 60 1 1\",
\"0 c #00aaff\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\"
};" 'xpm t :ascent 'center))
	 mode-line-format))
  (message "\ntest-mode-line"))

(global-set-key [f1] 'test-mode-line)

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-01-04 20:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-31  9:57 bug#38828: 26.3; Customized mode line breaks height of vertical scroll bar martin rudalics
2019-12-31 16:05 ` martin rudalics
2020-01-01 16:10 ` Eli Zaretskii
2020-01-01 17:49   ` martin rudalics
2020-01-02 14:15     ` Eli Zaretskii
2020-01-02 19:19       ` martin rudalics
2020-01-02 19:58         ` Eli Zaretskii
2020-01-03  7:31           ` Eli Zaretskii
2020-01-03  9:38           ` martin rudalics
2020-01-03 10:19             ` Eli Zaretskii
2020-01-03 10:43               ` martin rudalics
2020-01-03 13:07                 ` Eli Zaretskii
2020-01-03 15:57                   ` martin rudalics
2020-01-03 16:08                     ` Eli Zaretskii
2020-01-03 16:34                       ` martin rudalics
2020-01-03 17:11                         ` Eli Zaretskii
2020-01-03 16:30                     ` Eli Zaretskii
2020-01-03 17:16                       ` martin rudalics
2020-01-04 19:36                       ` Amin Bandali
2020-01-04 19:43                         ` Eli Zaretskii
2020-01-04 20:25                           ` Amin Bandali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).