]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fdisplay_buffer): If largest or LRU window is the
authorMartin Rudalics <rudalics@gmx.at>
Tue, 17 Jul 2007 07:27:27 +0000 (07:27 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 17 Jul 2007 07:27:27 +0000 (07:27 +0000)
only window, split it even if it is not eligible for splitting.
This restores the original behavior broken by the 2007-07-15
change.

src/ChangeLog
src/window.c

index e9f89ae554df834c30209c40288947b69dc9bc50..441f2c6792228a53f8d9661c14060e7e5c655ad7 100644 (file)
@@ -1,3 +1,10 @@
+2007-07-17  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.c (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.
+
 2007-07-17  Glenn Morris  <rgm@gnu.org>
 
        * abbrev.c (abbrev_check_chars): New function.
index c32b1a34f7d1395fd60b51fcce9a51c95703c58c..8e75ef7f5d23a583e2b216cf7143003ed5d7a2ec 100644 (file)
@@ -3738,12 +3738,13 @@ displayed.  */)
       else
        window = Fget_largest_window (frames, Qt);
 
-      /* If we got a tall enough full-width window that can be split,
-        split it.  */
+      /* If the largest window is tall enough, full-width, and either eligible
+        for splitting or the only window, split it.  */
       if (!NILP (window)
          && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame))
          && WINDOW_FULL_WIDTH_P (XWINDOW (window))
-         && window_height (window) >= split_height_threshold
+         && (window_height (window) >= split_height_threshold
+             || (NILP (XWINDOW (window)->parent)))
          && (window_height (window)
              >= (2 * window_min_size_2 (XWINDOW (window), 0))))
        window = Fsplit_window (window, Qnil, Qnil);
@@ -3752,13 +3753,13 @@ displayed.  */)
          Lisp_Object upper, lower, other;
 
          window = Fget_lru_window (frames, Qt);
-         /* If the LRU window is selected, and big enough,
-            and can be split, split it.  */
+         /* If the LRU window is tall enough, and either eligible for splitting
+         and selected or the only window, split it.  */
          if (!NILP (window)
              && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame))
-             && (EQ (window, selected_window)
-                 || NILP (XWINDOW (window)->parent))
-             && window_height (window) >= split_height_threshold
+             && ((EQ (window, selected_window)
+                  && window_height (window) >= split_height_threshold)
+                 || (NILP (XWINDOW (window)->parent)))
              && (window_height (window)
                  >= (2 * window_min_size_2 (XWINDOW (window), 0))))
            window = Fsplit_window (window, Qnil, Qnil);
@@ -7601,4 +7602,4 @@ keys_of_window ()
 }
 
 /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f
-   (do not change this comment) */
+   (do not change thisomment) */