GNU bug report logs -
#21333
25.0.50; window-size-change-functions not called after mini-window resize
Previous Next
Reported by: Pip Cet <pipcet <at> gmail.com>
Date: Sun, 23 Aug 2015 22:07:02 UTC
Severity: normal
Merged with 830,
21869
Found in versions 24.0.90, 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 21333 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 24 Aug 2015 20:06:54 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 21333 <at> debbugs.gnu.org
>
> > That said, I wonder whether changing the code now to call these
> > functions due to automatic resizing would make sense. What would be
> > the real-life use cases for using that?
>
> Naively spoken it's obvious that when you shrink the minibuffer you show
> more lines in the window above and ‘linum-mode’ has to add numbers for
> those lines. And when you enlarge the minibuffer, ‘follow-mode’ will
> lose some lines at the bottom of the left window and has to show them at
> the top of the right window.
In well-behaved modes this happens automatically, as part of
redisplay.
> Maybe they use the ‘post-command-hook’ function instead.
Of course, they do! The flag of bad design.
> > If anything, IMO we should _reduce_ the number of unrelated events
> > that trigger a call to these functions. For example, currently any
> > command that reads from the minibuffer will trigger it, because when
> > read-from-minibuffer exits, it restores the window configuration by
> > calling set-window-configuration, which is documented to trigger these
> > functions. That just doesn't make any sense to me, since most reads
> > from the minibuffer don't resize any windows!
>
> This is, in fact, an abuse of ‘set-window-configuration’. But how fix
> it? We'd need a hook, say ‘window-size-change-functions’, that tracks,
> among other things, whether a window was resized due to a change of the
> minibuffer height and, if that happens, set a flag to indicate that the
> window configuration must be restored.
I'd say, don't set the "size changed" flag unless the size really
changed.
This bug report was last modified 9 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.