[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: check_min_window_sizes]
From: |
Richard Stallman |
Subject: |
Re: address@hidden: check_min_window_sizes] |
Date: |
Mon, 27 Feb 2006 03:59:43 -0500 |
That's a bug in `mouse-drag-vertical-line'. It can be reproduced by
removing fringes and customizing window-min-width to 2. If you now
split a window horizontally and drag the vertical divider such that the
right window shrinks to its minimum width you can't enlarge it anymore.
The bug occurs because `mouse-drag-vertical-line' compares coordinates
returned by `window-edges' with `frame-width'. I believe that
`window-inside-edges' should be used here, see the attached patch.
Has this been fixed?
Does anyone see a problem in Martin's patch?
That's a bug in `mouse-drag-vertical-line'. It can be reproduced by
removing fringes and customizing window-min-width to 2. If you now
split a window horizontally and drag the vertical divider such that the
right window shrinks to its minimum width you can't enlarge it anymore.
The bug occurs because `mouse-drag-vertical-line' compares coordinates
returned by `window-edges' with `frame-width'. I believe that
`window-inside-edges' should be used here, see the attached patch.
--------------090804020609060500080901
Content-Type: text/plain;
name="mouse-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mouse-patch"
* mouse.el (mouse-drag-vertical-line): Use window-inside-edges instead
of window-edges. Remove start-nwindows since it's not needed.
*** mouse.el Thu Jan 5 07:44:38 2006
--- mouse.el Mon Feb 20 10:47:32 2006
***************
*** 551,569 ****
(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")))
(track-mouse
(progn
;; enlarge-window only works on the selected window, so
--- 551,570 ----
(echo-keystrokes 0)
(start-event-frame (window-frame (car (car (cdr start-event)))))
(start-event-window (car (car (cdr start-event))))
event mouse x left right edges wconfig growth
(which-side
(or (cdr (assq 'vertical-scroll-bars (frame-parameters
start-event-frame)))
'right)))
! (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
***************
*** 609,615 ****
(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
--- 610,616 ----
(previous-window))))
(setq x (- (car (cdr mouse))
(if (eq which-side 'right) 0 2))
! edges (window-inside-edges window)
left (nth 0 edges)
right (nth 2 edges))
;; scale back a move that would make the
--------------090804020609060500080901--
Re: address@hidden: check_min_window_sizes], Richard M. Stallman, 2006/02/19