[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6400: I want to stay with a sibling window
From: |
Lennart Borgman |
Subject: |
bug#6400: I want to stay with a sibling window |
Date: |
Fri, 11 Jun 2010 19:04:42 +0200 |
On Fri, Jun 11, 2010 at 3:22 PM, martin rudalics <rudalics@gmx.at> wrote:
>> A small patch to make the selected window one of the siblings when the
>> selected window is deleted.
>>
>> I do not understand the code so I am not sure this is correct. Martin?
>
> if (EQ (FRAME_SELECTED_WINDOW (f), selected_window))
>
> This conditional checks only whether f is the selected frame. You
> probably want to make sib the frame's selected window whenever you
> delete the frame's selected window.
Yes, that is what I want.
There is a bug in the patch. I assumed that if "sib" was non-nil then
it would be a buffer window. That is not the case so a check of that
must be made. The most simple is to add another check with
WINDOW_LIVE_P.
> if (!EQ (XWINDOW (window)->frame, selected_frame))
> - Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
> + Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)), Qnil);
>
> And you almost certainly want to tell us what this is meant for ;-)
Eh, forgot I had this little patch there... ;-)
I have added a second optional arg to make-frame-visible:
dont-activate. This is for use with top-most windows etc. I will come
back to that when I have time.