diff options
| author | Karl Heuer | 1998-12-10 03:26:25 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-12-10 03:26:25 +0000 |
| commit | 4e363e7e63fa8c7d95b4915e7d79a3eb7a4fe434 (patch) | |
| tree | 1e2c646ffaa45d56dc778f609b286bb8f1978f27 | |
| parent | 0f619a41267085b1efdad90a019f600ba37e6a32 (diff) | |
| download | emacs-4e363e7e63fa8c7d95b4915e7d79a3eb7a4fe434.tar.gz emacs-4e363e7e63fa8c7d95b4915e7d79a3eb7a4fe434.zip | |
(mouse-drag-vertical-line):
If WHICH-SIDE is not `right', then scroll bars are on the left.
| -rw-r--r-- | lisp/mouse.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 781738253d7..47ede180693 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -317,12 +317,12 @@ This command must be bound to a mouse click." | |||
| 317 | 'right))) | 317 | 'right))) |
| 318 | (if (one-window-p t) | 318 | (if (one-window-p t) |
| 319 | (error "Attempt to resize sole ordinary window")) | 319 | (error "Attempt to resize sole ordinary window")) |
| 320 | (if (eq which-side 'left) | 320 | (if (eq which-side 'right) |
| 321 | (if (= (nth 0 (window-edges start-event-window)) 0) | 321 | (if (= (nth 2 (window-edges start-event-window)) |
| 322 | (error "Attempt to drag leftmost scrollbar")) | 322 | (frame-width start-event-frame)) |
| 323 | (if (= (nth 2 (window-edges start-event-window)) | 323 | (error "Attempt to drag rightmost scrollbar")) |
| 324 | (frame-width start-event-frame)) | 324 | (if (= (nth 0 (window-edges start-event-window)) 0) |
| 325 | (error "Attempt to drag rightmost scrollbar"))) | 325 | (error "Attempt to drag leftmost scrollbar"))) |
| 326 | (track-mouse | 326 | (track-mouse |
| 327 | (progn | 327 | (progn |
| 328 | ;; enlarge-window only works on the selected window, so | 328 | ;; enlarge-window only works on the selected window, so |
| @@ -363,10 +363,10 @@ This command must be bound to a mouse click." | |||
| 363 | (save-selected-window | 363 | (save-selected-window |
| 364 | ;; If the scroll bar is on the window's left, | 364 | ;; If the scroll bar is on the window's left, |
| 365 | ;; adjust the window on the left. | 365 | ;; adjust the window on the left. |
| 366 | (if (eq which-side 'left) | 366 | (unless (eq which-side 'right) |
| 367 | (select-window (previous-window))) | 367 | (select-window (previous-window))) |
| 368 | (setq x (- (car (cdr mouse)) | 368 | (setq x (- (car (cdr mouse)) |
| 369 | (if (eq which-side 'left) 2 0)) | 369 | (if (eq which-side 'right) 0 2)) |
| 370 | edges (window-edges) | 370 | edges (window-edges) |
| 371 | left (nth 0 edges) | 371 | left (nth 0 edges) |
| 372 | right (nth 2 edges)) | 372 | right (nth 2 edges)) |