summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-07 22:19:50 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-07 22:19:50 +0000
commit69518456248b91ba15de2aed4684aac5cab8173b (patch)
treed723d112c90a64ddefa93b5f1c317a4d953f2131
parent525d6e100c6773359813969f28757c3886c081c8 (diff)
downloademacs-69518456248b91ba15de2aed4684aac5cab8173b.tar.gz
(mouse-drag-mode-line): Don't get error
about sole window, if we don't actually try to change the size.
-rw-r--r--lisp/mouse.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index c96a2aaca54..d45c04cd9df 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -198,9 +198,7 @@ This command must be bound to a mouse click."
should-enlarge-minibuffer
event mouse minibuffer y top bot edges wconfig params growth)
(setq params (frame-parameters))
- (if (and (not (setq minibuffer (cdr (assq 'minibuffer params))))
- (one-window-p t))
- (error "Attempt to resize sole window"))
+ (setq minibuffer (cdr (assq 'minibuffer params)))
(track-mouse
(progn
;; enlarge-window only works on the selected window, so
@@ -256,6 +254,11 @@ This command must be bound to a mouse click."
;; compute size change needed
(setq growth (- y bot -1)
wconfig (current-window-configuration))
+ ;; Check for an error case.
+ (if (and (/= growth 0)
+ (not minibuffer)
+ (one-window-p t))
+ (error "Attempt to resize sole window"))
;; grow/shrink minibuffer?
(if should-enlarge-minibuffer
(progn