aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorMartin Rudalics2007-07-17 07:27:27 +0000
committerMartin Rudalics2007-07-17 07:27:27 +0000
commit71ec17e68295ebf6b570b17a7303612052bbd12b (patch)
tree260f295fb8d7767555486536c06a863a9d65cd0a /src/window.c
parent857cc3fc2c4250480caae0b663210af0b6913987 (diff)
downloademacs-71ec17e68295ebf6b570b17a7303612052bbd12b.tar.gz
emacs-71ec17e68295ebf6b570b17a7303612052bbd12b.zip
(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.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/window.c b/src/window.c
index c32b1a34f7d..8e75ef7f5d2 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3738,12 +3738,13 @@ displayed. */)
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);
@@ -3752,13 +3753,13 @@ displayed. */)
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);
@@ -7601,4 +7602,4 @@ keys_of_window ()
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) */