emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: enlarge-window with preserve-before non-nil]


From: Jan D.
Subject: Re: address@hidden: enlarge-window with preserve-before non-nil]
Date: Sun, 08 May 2005 22:24:13 +0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Richard Stallman wrote:

Can someone please investigate this, and ack?

I looked a bit, but I am not sure how it shall work. If I just to three windows, in the obvious way (C-x 2, C-x 2), I get three windows, one 11 lines, one 12 lines and one 24 lines. This gives me this window configuration:

0x86b6b10: vchild: 0x861d830, hchild: 0x0, next: 0x861d9c8, parent: 0x0, h: 47 0x861d830: vchild: 0x0, hchild: 0x0, next: 0x8694a50, parent: 0x86b6b10, h: 11 0x8694a50: vchild: 0x0, hchild: 0x0, next: 0x86b6ca8, parent: 0x86b6b10, h: 12
0x86b6ca8: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x86b6b10, h: 24
0x861d9c8: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x0, h: 1

But if I create the same three windows (11, 12 and 24 lines) with the method below, I get this window configuration:

0x8833558: vchild: 0x87f9978, hchild: 0x0, next: 0x861d9c8, parent: 0x0, h: 47 0x87f9978: vchild: 0x86a7a48, hchild: 0x0, next: 0x8820a48, parent: 0x8833558, h: 23 0x86a7a48: vchild: 0x0, hchild: 0x0, next: 0x87b6d68, parent: 0x87f9978, h: 11
0x87b6d68: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x87f9978, h: 12
0x8820a48: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x8833558, h: 24
0x861d9c8: vchild: 0x0, hchild: 0x0, next: 0x0, parent: 0x0, h: 1

When enlarge-window shall enlarge a window (the one with 12 lines in this case), it calculates the maximum lines it can enlarge it to. Since enlarge-window gets called with PRESERVE_BEFORE set to t, in the first case this is: 47 (the parent) - 11 (the sibling to preserve) = 36 (> 12, i.e. enlarge is OK).

In the second case:
23 (the parent) - 11 (the sibling to preserve) = 12 (i.e. can not enlarge).


If the window trees shall be the same, there is a bug in adding/removing windows, as the extra 23 line parent then should be removed. But it may be a bug in enlarge-window also, it should in the second case use the topmost parents height.

   Jan D.

------- Start of forwarded message -------
X-Authenticated: #14592706
Date: Sun, 01 May 2005 14:21:26 +0200
From: martin rudalics <address@hidden>
X-Accept-Language: de-DE, de, en-us, en
To: emacs-pretest-bug <address@hidden>
X-Y-GMX-Trusted: 0
Subject: enlarge-window with preserve-before non-nil
Sender: address@hidden
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63

Suppose I start with a single window called W1 (window names are
fictional)

W1

split W1 horizontally

W1 | W2

split W2 vertically

   | W2
W1 |---
   | W3

delete W1

W2
- --
W3

split W2 horizontally

W2 | W4
- -------
   W3

split W4 vertically

   | W4
W2 |---
   | W5
- -------
   W3

and delete W2

W4
- --
W5
- --
W3

At this moment I can't enlarge W5 any more by "dragging its modeline
down" - the window configuration appears "frozen".  The attempt to
shrink W5 by dragging its modeline "up" has an effect similar to that of
dragging W4's modeline down, that means, W4 gets enlarged and not W3.
Likely, in this scenario siblings got confused before issuing the call
to `enlarge-window' with PRESERVE-BEFORE non-nil.



_______________________________________________
Emacs-pretest-bug mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel





reply via email to

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