GNU bug report logs -
#79125
quit-window fails to restore window height in a scenario of buffer reuse
Previous Next
Full log
View this message in rfc822 format
On 31/07/2025 11:46, martin rudalics wrote:
> (defun vc-shrink-buffer-window (&optional buffer)
> "Call `shrink-window-if-larger-than-buffer' only when BUFFER is visible.
> BUFFER defaults to the current buffer."
> (let ((window (get-buffer-window buffer t)))
> (when window
> (let* ((quit-restore (window-parameter window 'quit-restore))
> (quad (and quit-restore (nth 1 quit-restore))))
> (when (or (not quit-restore) (not (list quad))
I think you meant 'listp' here.
> (eq (window-buffer window) (nth 0 quad)))
> (shrink-window-if-larger-than-buffer window))))))
I've tried it out, and it doesn't seem to fix the original scenario.
If the goal was to implement your explanation from the other subthread:
> In the following cases:
>
> - The window is new.
>
> - The window was already in use for this buffer.
...then it seems fail because it resizes an existing window showing a
different buffer. Probably because the value of QUAD is 'window', in my
testing.
This bug report was last modified 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.