emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: mouse-drag-vertical-line or mouse-drag-mode-line fai


From: Chong Yidong
Subject: Re: address@hidden: mouse-drag-vertical-line or mouse-drag-mode-line failed with complex window split]
Date: Sun, 11 Jun 2006 15:32:06 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> Would someone please investigate this and ack?
>
> From: Eugene Vlasov <address@hidden>
> 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  <address@hidden>

        * 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))




reply via email to

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