From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [eugene@ikz.ru: mouse-drag-vertical-line or mouse-drag-mode-line failed with complex window split] Date: Sun, 11 Jun 2006 15:32:06 -0400 Message-ID: <87bqsz1oax.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1150054739 15971 80.91.229.2 (11 Jun 2006 19:38:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Jun 2006 19:38:59 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 11 21:38:58 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 1FpVly-0001qZ-9k for ged-emacs-devel@m.gmane.org; Sun, 11 Jun 2006 21:38:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FpVlx-0000vM-OE for ged-emacs-devel@m.gmane.org; Sun, 11 Jun 2006 15:38:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FpVln-0000vH-C9 for emacs-devel@gnu.org; Sun, 11 Jun 2006 15:38:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FpVlm-0000tW-9K for emacs-devel@gnu.org; Sun, 11 Jun 2006 15:38:46 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FpVuK-00076m-Vn; Sun, 11 Jun 2006 15:47:37 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k5BJcjsV029784; Sun, 11 Jun 2006 15:38:45 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id k5BJWIuu011788; Sun, 11 Jun 2006 15:32:18 -0400 (EDT) Original-Received: from cyd (SYDNEYPACIFIC-FOUR-NINETY-ONE.MIT.EDU [18.95.6.236]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k5BJW6CZ027059; Sun, 11 Jun 2006 15:32:06 -0400 (EDT) Original-Received: from cyd by cyd with local (Exim 3.36 #1 (Debian)) id 1FpVfK-0002zH-00; Sun, 11 Jun 2006 15:32:06 -0400 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 05 Jun 2006 11:38:06 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: 1.47 X-Scanned-By: MIMEDefang 2.42 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:55836 Archived-At: Richard Stallman writes: > Would someone please investigate this and ack? > > From: Eugene Vlasov > Subject: mouse-drag-vertical-line or mouse-drag-mode-line failed with > complex window split > > 1. Start emacs: emacs -Q > 2. Split window horizontally: C-x 3 > 3. Split one of windows vertically: C-x 2 > After this position of vertical divider cannot be changed with mouse-1 > grag, but keyboard bindings for wide/narrow window works. The bug was introduced by the following change. I don't know which part of your patch creates the problem. 2006-04-18 Richard Stallman * window.c (adjust_window_trailing_edge): Correctly distinguish series vs parallel cases, even when window has no parent. *** emacs/src/window.c 2006/04/17 21:50:59 1.542 --- emacs/src/window.c 2006/04/18 20:56:31 1.543 *************** *** 4275,4292 **** while (1) { p = XWINDOW (window); parent = p->parent; ! /* Make sure there is a following window. */ ! if (NILP (parent) ! && (horiz_flag ? 1 ! : NILP (XWINDOW (window)->next))) { Fset_window_configuration (old_config); error ("No other window following this one"); } /* Don't make this window too small. */ if (XINT (CURSIZE (window)) + delta < (horiz_flag ? window_min_width : window_min_height)) --- 4275,4304 ---- while (1) { + Lisp_Object first_parallel = Qnil; + p = XWINDOW (window); parent = p->parent; ! if (NILP (XWINDOW (window)->next)) { Fset_window_configuration (old_config); error ("No other window following this one"); } + /* See if this level has windows in parallel in the specified + direction. If so, set FIRST_PARALLEL to the first one. */ + if (horiz_flag) + { + if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild)) + first_parallel = XWINDOW (parent)->vchild; + } + else + { + if (! NILP (parent) && !NILP (XWINDOW (parent)->hchild)) + first_parallel = XWINDOW (parent)->hchild; + } + /* Don't make this window too small. */ if (XINT (CURSIZE (window)) + delta < (horiz_flag ? window_min_width : window_min_height)) *************** *** 4304,4315 **** XINT (CURSIZE (window)) + delta); /* If this window has following siblings in the desired dimension, ! make them smaller. (If we reach the top of the tree and can never do this, we will fail and report an error, above.) */ ! if (horiz_flag ! ? !NILP (XWINDOW (parent)->hchild) ! : !NILP (XWINDOW (parent)->vchild)) { if (!NILP (XWINDOW (window)->next)) { --- 4316,4326 ---- XINT (CURSIZE (window)) + delta); /* If this window has following siblings in the desired dimension, ! make them smaller, and exit the loop. ! (If we reach the top of the tree and can never do this, we will fail and report an error, above.) */ ! if (NILP (first_parallel)) { if (!NILP (XWINDOW (window)->next)) { *************** *** 4331,4339 **** else /* Here we have a chain of parallel siblings, in the other dimension. Change the size of the other siblings. */ ! for (child = (horiz_flag ! ? XWINDOW (parent)->vchild ! : XWINDOW (parent)->hchild); ! NILP (child); child = XWINDOW (child)->next) if (! EQ (child, window)) --- 4342,4348 ---- else /* Here we have a chain of parallel siblings, in the other dimension. Change the size of the other siblings. */ ! for (child = first_parallel; ! NILP (child); child = XWINDOW (child)->next) if (! EQ (child, window))