summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-03-16 15:14:57 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-03-16 15:14:57 +0000
commit89a94f1e3d9dbfd7d074e6f67c916173efe10128 (patch)
treeb11d5759946b33f4a2274df704f620d09aa166f1 /lisp/mouse.el
parente09ce637d3709b6a90a87b857387b2a60be10071 (diff)
downloademacs-89a94f1e3d9dbfd7d074e6f67c916173efe10128.tar.gz
* mouse.el (mouse-drag-vertical-line): Use window-inside-edges
when checking for attempt to drag leftmost or rightmost scrollbar.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 3a22fb49b04..c399515a3d2 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -538,19 +538,20 @@ resized by dragging their header-line."
(echo-keystrokes 0)
(start-event-frame (window-frame (car (car (cdr start-event)))))
(start-event-window (car (car (cdr start-event))))
- (start-nwindows (count-windows t))
event mouse x left right edges wconfig growth
(which-side
(or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame)))
'right)))
- (if (one-window-p t)
- (error "Attempt to resize sole ordinary window"))
- (if (eq which-side 'right)
- (if (= (nth 2 (window-edges start-event-window))
- (frame-width start-event-frame))
- (error "Attempt to drag rightmost scrollbar"))
- (if (= (nth 0 (window-edges start-event-window)) 0)
- (error "Attempt to drag leftmost scrollbar")))
+ (cond
+ ((one-window-p t)
+ (error "Attempt to resize sole ordinary window"))
+ ((and (eq which-side 'right)
+ (>= (nth 2 (window-inside-edges start-event-window))
+ (frame-width start-event-frame)))
+ (error "Attempt to drag rightmost scrollbar"))
+ ((and (eq which-side 'left)
+ (= (nth 0 (window-inside-edges start-event-window)) 0))
+ (error "Attempt to drag leftmost scrollbar")))
(track-mouse
(progn
;; enlarge-window only works on the selected window, so