(setq ignore 'preserved)
(setq right first-right)
(while (and right
- (or (window-size-fixed-p right horizontal 'preserved))
- (<= (window-size right horizontal t)
- (window-min-size right horizontal 'preserved t)))
+ (or (window-size-fixed-p right horizontal 'preserved)
+ (<= (window-size right horizontal t)
+ (window-min-size right horizontal 'preserved t))))
(setq right
(or (window-right right)
(progn
(window--resize-mini-window minibuffer-window (- delta)))
((window--resizable-p nil delta horizontal)
(window-resize nil delta horizontal))
+ ((window--resizable-p nil delta horizontal 'preserved)
+ (window-resize nil delta horizontal 'preserved))
+ ((eq this-command 'enlarge-window)
+ (user-error "Cannot enlarge selected window"))
(t
- (window-resize
- nil (if (> delta 0)
- (window-max-delta nil horizontal)
- (- (window-min-delta nil horizontal)))
- horizontal)))))
+ (error "Cannot enlarge selected window")))))
(defun shrink-window (delta &optional horizontal)
"Make the selected window DELTA lines smaller.
(window--resize-mini-window minibuffer-window delta))
((window--resizable-p nil (- delta) horizontal)
(window-resize nil (- delta) horizontal))
+ ((window--resizable-p nil (- delta) horizontal 'preserved)
+ (window-resize nil (- delta) horizontal 'preserved))
+ ((eq this-command 'shrink-window)
+ (user-error "Cannot shrink selected window"))
(t
- (window-resize
- nil (if (> delta 0)
- (- (window-min-delta nil horizontal))
- (window-max-delta nil horizontal))
- horizontal)))))
+ (error "Cannot shrink selected window")))))
(defun maximize-window (&optional window)
"Maximize WINDOW.