aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index 9f33695527b..5153ea191e2 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1929,9 +1929,21 @@ set_window_height (window, height, nodelete)
1929 1929
1930 check_min_window_sizes (); 1930 check_min_window_sizes ();
1931 1931
1932 /* If the window has been "too small" at one point,
1933 don't delete it for being "too small" in the future.
1934 Preserve it as long as that is at all possible. */
1935 if (oheight < window_min_height)
1936 w->too_small_ok = Qt;
1937
1932 if (!nodelete && !NILP (w->parent)) 1938 if (!nodelete && !NILP (w->parent))
1933 { 1939 {
1934 int min_height = window_min_size (w, 0); 1940 int min_height;
1941
1942 if (!MINI_WINDOW_P (w) && !NILP (w->too_small_ok))
1943 min_height = MIN_SAFE_WINDOW_HEIGHT;
1944 else
1945 min_height = window_min_size (w, 0);
1946
1935 if (height < min_height) 1947 if (height < min_height)
1936 { 1948 {
1937 delete_window (window); 1949 delete_window (window);
@@ -1998,7 +2010,16 @@ set_window_width (window, width, nodelete)
1998 int left, pos, lastright, opos, lastoright; 2010 int left, pos, lastright, opos, lastoright;
1999 Lisp_Object child; 2011 Lisp_Object child;
2000 2012
2001 if (!nodelete && width < window_min_width && !NILP (w->parent)) 2013 /* If the window has been "too small" at one point,
2014 don't delete it for being "too small" in the future.
2015 Preserve it as long as that is at all possible. */
2016 if (owidth < window_min_width)
2017 w->too_small_ok = Qt;
2018
2019 if (!nodelete && !NILP (w->parent)
2020 && (! NILP (w->too_small_ok)
2021 ? width < MIN_SAFE_WINDOW_WIDTH
2022 : width < window_min_width))
2002 { 2023 {
2003 delete_window (window); 2024 delete_window (window);
2004 return; 2025 return;