[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107869: Fix resizing of minibuffe
From: |
martin rudalics |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107869: Fix resizing of minibuffer windows (Bug#11276). |
Date: |
Fri, 20 Apr 2012 10:49:24 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107869
committer: martin rudalics <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-04-20 10:49:24 +0200
message:
Fix resizing of minibuffer windows (Bug#11276).
* window.el (adjust-window-trailing-edge, enlarge-window)
(shrink-window, window-resize):
* mouse.el (mouse-drag-line): Fix resizing of minibuffer
windows (Bug#11276).
modified:
lisp/ChangeLog
lisp/mouse.el
lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-04-20 07:32:35 +0000
+++ b/lisp/ChangeLog 2012-04-20 08:49:24 +0000
@@ -1,3 +1,10 @@
+2012-04-20 Martin Rudalics <address@hidden>
+
+ * window.el (adjust-window-trailing-edge, enlarge-window)
+ (shrink-window, window-resize):
+ * mouse.el (mouse-drag-line): Fix resizing of minibuffer
+ windows (Bug#11276).
+
2012-04-20 Dan Nicolaescu <address@hidden>
* battery.el (battery-echo-area-format): Display remaining time
=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el 2012-01-19 07:21:25 +0000
+++ b/lisp/mouse.el 2012-04-20 08:49:24 +0000
@@ -404,13 +404,16 @@
(or mouse-1-click-in-non-selected-windows
(eq window (selected-window)))
(mouse-on-link-p start)))
- (enlarge-minibuffer
+ (resize-minibuffer
+ ;; Resize the minibuffer window if it's on the same frame as
+ ;; and immediately below the position window and it's either
+ ;; active or `resize-mini-windows' is nil.
(and (eq line 'mode)
- (not resize-mini-windows)
(eq (window-frame minibuffer-window) frame)
- (not (one-window-p t frame))
(= (nth 1 (window-edges minibuffer-window))
- (nth 3 (window-edges window)))))
+ (nth 3 (window-edges window)))
+ (or (not resize-mini-windows)
+ (eq minibuffer-window (active-minibuffer-window)))))
(which-side
(and (eq line 'vertical)
(or (cdr (assq 'vertical-scroll-bars (frame-parameters frame)))
@@ -425,7 +428,7 @@
((eq line 'mode)
;; Check whether mode-line can be dragged at all.
(when (and (window-at-side-p window 'bottom)
- (not enlarge-minibuffer))
+ (not resize-minibuffer))
(setq done t)))
((eq line 'vertical)
;; Get the window to adjust for the vertical case.
@@ -499,13 +502,9 @@
;; Remember that we dragged.
(setq dragged t))
- (cond
- (enlarge-minibuffer
- (adjust-window-trailing-edge window growth))
- ((eq line 'mode)
- (adjust-window-trailing-edge window growth))
- (t
- (adjust-window-trailing-edge window (- growth)))))))
+ (if (eq line 'mode)
+ (adjust-window-trailing-edge window growth)
+ (adjust-window-trailing-edge window (- growth))))))
;; Presumably, if this was just a click, the last event should be
;; `mouse-1', whereas if this did move the mouse, it should be a
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2012-04-20 06:27:11 +0000
+++ b/lisp/window.el 2012-04-20 08:49:24 +0000
@@ -1486,8 +1486,10 @@
(cond
((eq window (frame-root-window frame))
(error "Cannot resize the root window of a frame"))
- ((window-minibuffer-p window)
- (window--resize-mini-window window delta))
+ ((window-minibuffer-p window)
+ (if horizontal
+ (error "Cannot resize minibuffer window horizontally")
+ (window--resize-mini-window window delta)))
((window--resizable-p window delta horizontal ignore)
(window--resize-reset frame horizontal)
(window--resize-this-window window delta horizontal ignore t)
@@ -2002,17 +2004,25 @@
the left. If the edge can't be moved by DELTA lines or columns,
move it as far as possible in the desired direction."
(setq window (window-normalize-window window))
- (let ((frame (window-frame window))
- (right window)
- left this-delta min-delta max-delta)
+ (let* ((frame (window-frame window))
+ (minibuffer-window (minibuffer-window frame))
+ (right window)
+ left this-delta min-delta max-delta)
;; Find the edge we want to move.
(while (and (or (not (window-combined-p right horizontal))
(not (window-right right)))
(setq right (window-parent right))))
(cond
- ((and (not right) (not horizontal) (not resize-mini-windows)
- (eq (window-frame (minibuffer-window frame)) frame))
- (window--resize-mini-window (minibuffer-window frame) (- delta)))
+ ((and (not right) (not horizontal)
+ ;; Resize the minibuffer window if it's on the same frame as
+ ;; and immediately below WINDOW and it's either active or
+ ;; `resize-mini-windows' is nil.
+ (eq (window-frame minibuffer-window) frame)
+ (= (nth 1 (window-edges minibuffer-window))
+ (nth 3 (window-edges window)))
+ (or (not resize-mini-windows)
+ (eq minibuffer-window (active-minibuffer-window))))
+ (window--resize-mini-window minibuffer-window (- delta)))
((or (not (setq left right)) (not (setq right (window-right right))))
(if horizontal
(error "No window on the right of this one")
@@ -2113,6 +2123,10 @@
((zerop delta))
((window-size-fixed-p nil horizontal)
(error "Selected window has fixed size"))
+ ((window-minibuffer-p)
+ (if horizontal
+ (error "Cannot resize minibuffer window horizontally")
+ (window--resize-mini-window (selected-window) delta)))
((window--resizable-p nil delta horizontal)
(window-resize nil delta horizontal))
(t
@@ -2135,6 +2149,10 @@
((zerop delta))
((window-size-fixed-p nil horizontal)
(error "Selected window has fixed size"))
+ ((window-minibuffer-p)
+ (if horizontal
+ (error "Cannot resize minibuffer window horizontally")
+ (window--resize-mini-window (selected-window) (- delta))))
((window--resizable-p nil (- delta) horizontal)
(window-resize nil (- delta) horizontal))
(t
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107869: Fix resizing of minibuffer windows (Bug#11276).,
martin rudalics <=