[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The window-pub branch
From: |
martin rudalics |
Subject: |
Re: The window-pub branch |
Date: |
Mon, 15 Nov 2010 18:01:03 +0100 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> Well, it definitely feels very disruptive to me, and from what you write
> I don't see a simple way to get rid of that behaviour.
The trunk would have refused to split the window in this case (assuming
split-height-threshold = 2 * window-min-height). I can do the same
here. Try with
(defun display-buffer-split-window-1 (window side min-size)
"Subroutine of `display-buffer-split-window'."
(let* ((horflag (memq side '(left right)))
(parent (window-parent window))
(resize (and (eq window-splits 'resize)
(window-iso-combined-p window horflag)))
(old-size
;; We either resize WINDOW or its parent.
(window-total-size (if resize parent window) horflag))
(new-size
(if resize
(min (- old-size (window-min-size parent horflag))
(/ old-size
(1+ (window-iso-combinations parent horflag))))
(/ old-size 2))))
;; Don't make any of the windows smaller than MIN-SIZE.
(when (and (> new-size min-size)
;; Check the sizes.
(if resize
(window-sizable-p parent (- new-size) horflag)
(window-sizable-p window (- new-size) horflag)))
;; We don't call `split-window-vertically' any more here. If for
;; some reason it seems appropriate we can always do so (provided
;; we give it an optional SIDE argument).
(split-window window (- new-size) side))))
> I believe at
> least `even-window-sizes' should take precedence over the
> min-{height-width} settings (or perhaps we could use (even-window-sizes
> . force) or something?).
In an earlier version I did apply `even-window-sizes' to split windows.
But if I do so, I deliberately ignore the `window-min-height' specifier
(or `split-height-threshold', whatever you prefer to call it) in the
case you mention. Also, evening out heights is done iff the new window
is smaller than the selected one so it would not apply by default here.
(BTW I hopefully fixed the minibuffer problem in the meantime. Please
try it when the fix makes it to the git mirror.)
martin
- The window-pub branch (was Re: bug#7381: 24.0.50; Provide a hook run when a window is selected), Štěpán Němec, 2010/11/14
- Re: The window-pub branch (was Re: bug#7381: 24.0.50; Provide a hook run when a window is selected), martin rudalics, 2010/11/14
- Re: The window-pub branch, Štěpán Němec, 2010/11/14
- Re: The window-pub branch, martin rudalics, 2010/11/15
- Re: The window-pub branch, Štěpán Němec, 2010/11/15
- Re: The window-pub branch, martin rudalics, 2010/11/15
- Re: The window-pub branch, Štěpán Němec, 2010/11/15
- Re: The window-pub branch,
martin rudalics <=
- Re: The window-pub branch, Štěpán Němec, 2010/11/15
- Re: The window-pub branch, martin rudalics, 2010/11/16
- Re: The window-pub branch, Štěpán Němec, 2010/11/16
- Re: The window-pub branch, martin rudalics, 2010/11/17
- Re: The window-pub branch, Štěpán Němec, 2010/11/17