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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Tue, Aug 25, 2015 at 7:25 AM, martin rudalics <rudalics <at> gmx.at> wrote:
>>> 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.
>
> Via ‘pre-redisplay-function’?
Well, we have `pre-redisplay-functions', with an s, defined in
simple.el, and I've attached some (trivial) code that takes things a
little further and calls a normal hook when a window's size changed.
> How does a well-behaved mode detect
> whether it has to make "this happen automatically"? By walking all
> windows and checking whether their sizes, start and end positions
> changed, I suppose.
That's what my code does. I thought I could get away with using the
arguments passed to pre-redisplay-function to limit which windows to
check, but that doesn't work when we "goto retry" and re-run
pre-redisplay-function. I will study the code in xdisp.c further and
see whether I can understand what the purpose of must_finish is.
>> I'd say, don't set the "size changed" flag unless the size really
>> changed.
>
> Sure.
Patch attached (no news on the paperwork so far). I'm not sure
precisely which properties should be checked for change, though.
I do think it would be best not to use set-window-configuration in
restoring state after exiting the minibuffer at all.
> Alternatively, Fset_window_configuration could run a modified version of
> ‘compare-window-configurations’ to compare the current configuration
> with the one to be restored and restore the old configuration iff these
> differ. I'm not sure whether this would be any cheaper, especially when
> the configuration does change frequently.
I think it would be better to do this explicitly, even if we have to
compare all properties.
Thanks again to both of you,
Pip
[emacs-via-redisplay-014.el (text/x-emacs-lisp, attachment)]
[0001-Only-set-FRAME_WINDOW_SIZES_CHANGED-if-necessary-213.patch (text/x-patch, attachment)]
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.