emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window resizing


From: Richard M. Stallman
Subject: Re: Window resizing
Date: Mon, 28 Nov 2005 15:59:58 -0500

    The analogous command to mouse-drag-mode-line is mouse-drag-vertical-line,
    also in mouse.el, and which also invokes enlarge-window.

Does this patch fix it?

*** mouse.el    27 Nov 2005 14:14:00 -0500      1.287
--- mouse.el    28 Nov 2005 10:56:37 -0500      
***************
*** 594,607 ****
                ((null (car (cdr mouse)))
                 nil)
                (t
!                (save-selected-window
!                  ;; If the scroll bar is on the window's left,
!                  ;; adjust the window on the left.
!                  (unless (eq which-side 'right)
!                    (select-window (previous-window)))
                   (setq x (- (car (cdr mouse))
                              (if (eq which-side 'right) 0 2))
!                        edges (window-edges)
                         left (nth 0 edges)
                         right (nth 2 edges))
                   ;; scale back a move that would make the
--- 594,608 ----
                ((null (car (cdr mouse)))
                 nil)
                (t
!                (let ((window
!                       ;; If the scroll bar is on the window's left,
!                       ;; adjust the window on the left.
!                       (if (eq which-side 'right)
!                           (selected-window)
!                         (previous-window))))
                   (setq x (- (car (cdr mouse))
                              (if (eq which-side 'right) 0 2))
!                        edges (window-edges window)
                         left (nth 0 edges)
                         right (nth 2 edges))
                   ;; scale back a move that would make the
***************
*** 609,627 ****
                   (if (< (- x left -1) window-min-width)
                       (setq x (+ left window-min-width -1)))
                   ;; compute size change needed
!                  (setq growth (- x right -1)
!                        wconfig (current-window-configuration))
!                  (enlarge-window growth t)
!                  ;; if this window's growth caused another
!                  ;; window to be deleted because it was too
!                  ;; thin, rescind the change.
!                  ;;
!                  ;; if size change caused space to be stolen
!                  ;; from a window to the left of this one,
!                  ;; rescind the change.
!                  (if (or (/= start-nwindows (count-windows t))
!                          (/= left (nth 0 (window-edges))))
!                      (set-window-configuration wconfig))))))))))
  
  (defun mouse-set-point (event)
    "Move point to the position clicked on with the mouse.
--- 610,619 ----
                   (if (< (- x left -1) window-min-width)
                       (setq x (+ left window-min-width -1)))
                   ;; compute size change needed
!                  (setq growth (- x right -1))
!                  (condition-case nil
!                      (adjust-window-trailing-edge window growth t)
!                    (error nil))))))))))
  
  (defun mouse-set-point (event)
    "Move point to the position clicked on with the mouse.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]