GNU bug report logs - #38828
26.3; Customized mode line breaks height of vertical scroll bar

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Tue, 31 Dec 2019 09:59:01 UTC

Severity: normal

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 38828 <at> debbugs.gnu.org
Subject: bug#38828: 26.3; Customized mode line breaks height of vertical scroll bar
Date: Thu, 02 Jan 2020 21:58:49 +0200
> Cc: 38828 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Thu, 2 Jan 2020 20:19:05 +0100
> 
>  > There's more than one problem here (didn't you wonder why pressing F3
>  > doesn't immediately redraw the mode line?).
> 
> It never did that unless I changed the size of some window too, so why
> should I have wondered?

Well, because if you don't do anything after F3, the mode line stays
without update forever.

> How expensive is watching a variable?

Just an extra 'if' in a few places where we set the variable, to check
if it's being watched.  Grep the sources for SYMBOL_TRAPPED_WRITE.

> So far I was convinced this would be used for debugging purposes only.

You can see at the end of frame.el we have a list of variables we
watch that have nothing to do with debugging.

> What does "resizing a window without allocating new rows" encompass?
> Is this only shrinking the window height ('shrink-/split-window') or
> also making a special line like the mode line taller (eating away some
> of the remaining matrix lines, naively spoken)?

Glyph matrices don't care about the pixel size of the window, they
only care about the maximum number of glyph rows they can
accommodate.  So increasing the size of a mode line has the effect of
making the window's glyph matrices use fewer rows (assuming the
window's pixel size doesn't change).  In addition, a GUI window
usually has a matrix allocated for more rows than it actually uses,
which is why each matrix has both 'nrows' and 'rows_allocated'
members, and the former is likely to be smaller than the latter.  When
a window's resize needs less rows that 'rows_allocated', there's no
reallocation, just a change in the 'nrows' field.

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.




This bug report was last modified 5 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.