Mercurial > emacs
comparison src/window.c @ 81929:504dd581ce3c
(Fdisplay_buffer): If largest or LRU window is the
only window, split it even if it is not eligible for splitting.
This restores the original behavior broken by the 2007-07-15
change.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Tue, 17 Jul 2007 07:22:59 +0000 |
parents | bb87fadde067 |
children | a7c29f19fb83 a1be62cbd32a |
comparison
equal
deleted
inserted
replaced
81928:a6745196bd94 | 81929:504dd581ce3c |
---|---|
3736 #endif | 3736 #endif |
3737 } | 3737 } |
3738 else | 3738 else |
3739 window = Fget_largest_window (frames, Qt); | 3739 window = Fget_largest_window (frames, Qt); |
3740 | 3740 |
3741 /* If we got a tall enough full-width window that can be split, | 3741 /* If the largest window is tall enough, full-width, and either eligible |
3742 split it. */ | 3742 for splitting or the only window, split it. */ |
3743 if (!NILP (window) | 3743 if (!NILP (window) |
3744 && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3744 && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
3745 && WINDOW_FULL_WIDTH_P (XWINDOW (window)) | 3745 && WINDOW_FULL_WIDTH_P (XWINDOW (window)) |
3746 && window_height (window) >= split_height_threshold | 3746 && (window_height (window) >= split_height_threshold |
3747 || (NILP (XWINDOW (window)->parent))) | |
3747 && (window_height (window) | 3748 && (window_height (window) |
3748 >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | 3749 >= (2 * window_min_size_2 (XWINDOW (window), 0)))) |
3749 window = Fsplit_window (window, Qnil, Qnil); | 3750 window = Fsplit_window (window, Qnil, Qnil); |
3750 else | 3751 else |
3751 { | 3752 { |
3752 Lisp_Object upper, lower, other; | 3753 Lisp_Object upper, lower, other; |
3753 | 3754 |
3754 window = Fget_lru_window (frames, Qt); | 3755 window = Fget_lru_window (frames, Qt); |
3755 /* If the LRU window is selected, and big enough, | 3756 /* If the LRU window is tall enough, and either eligible for splitting |
3756 and can be split, split it. */ | 3757 and selected or the only window, split it. */ |
3757 if (!NILP (window) | 3758 if (!NILP (window) |
3758 && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3759 && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
3759 && (EQ (window, selected_window) | 3760 && ((EQ (window, selected_window) |
3760 || NILP (XWINDOW (window)->parent)) | 3761 && window_height (window) >= split_height_threshold) |
3761 && window_height (window) >= split_height_threshold | 3762 || (NILP (XWINDOW (window)->parent))) |
3762 && (window_height (window) | 3763 && (window_height (window) |
3763 >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | 3764 >= (2 * window_min_size_2 (XWINDOW (window), 0)))) |
3764 window = Fsplit_window (window, Qnil, Qnil); | 3765 window = Fsplit_window (window, Qnil, Qnil); |
3765 else | 3766 else |
3766 window = Fget_lru_window (frames, Qnil); | 3767 window = Fget_lru_window (frames, Qnil); |
7599 initial_define_key (global_map, Ctl('L'), "recenter"); | 7600 initial_define_key (global_map, Ctl('L'), "recenter"); |
7600 initial_define_key (meta_map, 'r', "move-to-window-line"); | 7601 initial_define_key (meta_map, 'r', "move-to-window-line"); |
7601 } | 7602 } |
7602 | 7603 |
7603 /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f | 7604 /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f |
7604 (do not change this comment) */ | 7605 (do not change thisc omment) */ |