From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [rudalics@gmx.at: check_min_window_sizes] Date: Mon, 20 Feb 2006 11:11:53 +0100 Message-ID: <43F995E9.4020209@gmx.at> References: <87u0axpbba.fsf@stupidchicken.com> <87ek208z5o.fsf@stupidchicken.com> <43F765BC.50608@gmx.at> <87bqx48gcc.fsf@stupidchicken.com> <43F83E04.7020000@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090804020609060500080901" X-Trace: sea.gmane.org 1140437721 11734 80.91.229.2 (20 Feb 2006 12:15:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2006 12:15:21 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 20 13:15:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FB9wj-0005zG-0S for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2006 13:15:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FB9m2-0008Gq-E8 for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2006 07:04:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FB89F-0001X2-Q1 for emacs-devel@gnu.org; Mon, 20 Feb 2006 05:20:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FB87M-0000uZ-0r for emacs-devel@gnu.org; Mon, 20 Feb 2006 05:18:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FB86E-0000S2-Dm for emacs-devel@gnu.org; Mon, 20 Feb 2006 05:16:59 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FB8CE-0000XV-My for emacs-devel@gnu.org; Mon, 20 Feb 2006 05:23:11 -0500 Original-Received: (qmail invoked by alias); 20 Feb 2006 10:16:55 -0000 Original-Received: from N805P021.adsl.highway.telekom.at (EHLO [62.47.44.149]) [62.47.44.149] by mail.gmx.net (mp031) with SMTP; 20 Feb 2006 11:16:55 +0100 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: martin rudalics In-Reply-To: <43F83E04.7020000@gmx.at> X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50810 Archived-At: This is a multi-part message in MIME format. --------------090804020609060500080901 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > > That's to be expected, no? Or do you think that turning on the fringe > > is supposed to increase the size of the window (I don't)? > > I agree with you. Unfortunately, Emacs doesn't. When, in the sequel, I > try to drag the vertical divider between the two windows Emacs tells me > something like: > > Debugger entered--Lisp error: (error "Attempt to drag rightmost scrollbar") > signal(error ("Attempt to drag rightmost scrollbar")) > error("Attempt to drag rightmost scrollbar") > mouse-drag-vertical-line((down-mouse-1 (# > vertical-line (1226 . 848) 3399399 nil 126 (0 . 3) nil (0 . 794) (1 . > 18)))) > call-interactively(mouse-drag-vertical-line) 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 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------090804020609060500080901--