GNU bug report logs -
#1806
dired-pop-to-buffer in wrong place
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Tue, 6 Jan 2009 15:40:04 UTC
Severity: normal
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #85 received at 1806 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
> As I can see currently `fit-window-to-buffer' always takes space
> from the bottom window, but we need it from the top window.
Looking at this again, I believe what you want is to invert the order of
stealing and giving as in the attached patch. Might have side-effects
elsewhere.
martin
[window.c.diff (text/plain, inline)]
Index: window.c
===================================================================
RCS file: /sources/emacs/emacs/src/window.c,v
retrieving revision 1.638
diff -c -r1.638 window.c
*** window.c 8 Jan 2009 03:16:08 -0000 1.638
--- window.c 8 Jan 2009 07:21:10 -0000
***************
*** 4125,4171 ****
while (delta != 0
&& (!NILP (next) || !NILP (prev)))
{
! if (! NILP (next))
{
! int this_one = ((*sizefun) (next)
! - window_min_size (XWINDOW (next), horiz_flag,
0, 0, &fixed_p));
if (!fixed_p)
{
if (this_one > delta)
this_one = delta;
! (*setsizefun) (next, (*sizefun) (next) - this_one, 0);
(*setsizefun) (window, XINT (*sizep) + this_one, 0);
delta -= this_one;
}
! next = XWINDOW (next)->next;
}
if (delta == 0)
break;
! if (! NILP (prev))
{
! int this_one = ((*sizefun) (prev)
! - window_min_size (XWINDOW (prev), horiz_flag,
0, 0, &fixed_p));
if (!fixed_p)
{
if (this_one > delta)
this_one = delta;
! first_affected = prev;
!
! (*setsizefun) (prev, (*sizefun) (prev) - this_one, 0);
(*setsizefun) (window, XINT (*sizep) + this_one, 0);
delta -= this_one;
}
! prev = XWINDOW (prev)->prev;
}
}
--- 4125,4171 ----
while (delta != 0
&& (!NILP (next) || !NILP (prev)))
{
! if (! NILP (prev))
{
! int this_one = ((*sizefun) (prev)
! - window_min_size (XWINDOW (prev), horiz_flag,
0, 0, &fixed_p));
if (!fixed_p)
{
if (this_one > delta)
this_one = delta;
! first_affected = prev;
!
! (*setsizefun) (prev, (*sizefun) (prev) - this_one, 0);
(*setsizefun) (window, XINT (*sizep) + this_one, 0);
delta -= this_one;
}
! prev = XWINDOW (prev)->prev;
}
if (delta == 0)
break;
! if (! NILP (next))
{
! int this_one = ((*sizefun) (next)
! - window_min_size (XWINDOW (next), horiz_flag,
0, 0, &fixed_p));
if (!fixed_p)
{
if (this_one > delta)
this_one = delta;
! (*setsizefun) (next, (*sizefun) (next) - this_one, 0);
(*setsizefun) (window, XINT (*sizep) + this_one, 0);
delta -= this_one;
}
! next = XWINDOW (next)->next;
}
}
This bug report was last modified 12 years and 236 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.