aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.c24
-rw-r--r--src/window.h12
2 files changed, 18 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c
index 20084a15c16..31e9782b4a8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4970,25 +4970,21 @@ window_wants_header_line (struct window *w)
4970 : 0); 4970 : 0);
4971} 4971}
4972 4972
4973/* Return number of lines of text (not counting mode lines) in W. */ 4973/* Return number of lines of text in window W, not counting the mode
4974 line and header line, if any. Do NOT use this for windows on GUI
4975 frames; use window_body_height instead. This function is only for
4976 windows on TTY frames, where it is much more efficient. */
4974 4977
4975int 4978int
4976window_internal_height (struct window *w) 4979window_internal_height (struct window *w)
4977{ 4980{
4978 int ht = w->total_lines; 4981 int ht = w->total_lines;
4979 4982
4980 if (!MINI_WINDOW_P (w)) 4983 if (window_wants_mode_line (w))
4981 { 4984 --ht;
4982 if (!NILP (w->parent)
4983 || WINDOWP (w->contents)
4984 || !NILP (w->next)
4985 || !NILP (w->prev)
4986 || window_wants_mode_line (w))
4987 --ht;
4988 4985
4989 if (window_wants_header_line (w)) 4986 if (window_wants_header_line (w))
4990 --ht; 4987 --ht;
4991 }
4992 4988
4993 return ht; 4989 return ht;
4994} 4990}
@@ -5017,8 +5013,8 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror)
5017 if (whole && Vfast_but_imprecise_scrolling) 5013 if (whole && Vfast_but_imprecise_scrolling)
5018 specbind (Qfontification_functions, Qnil); 5014 specbind (Qfontification_functions, Qnil);
5019 5015
5020 /* If we must, use the pixel-based version which is much slower than 5016 /* On GUI frames, use the pixel-based version which is much slower
5021 the line-based one but can handle varying line heights. */ 5017 than the line-based one but can handle varying line heights. */
5022 if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame))) 5018 if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame)))
5023 window_scroll_pixel_based (window, n, whole, noerror); 5019 window_scroll_pixel_based (window, n, whole, noerror);
5024 else 5020 else
diff --git a/src/window.h b/src/window.h
index cc0b6b6667d..b3673a0b454 100644
--- a/src/window.h
+++ b/src/window.h
@@ -93,12 +93,14 @@ struct window
93 /* The frame this window is on. */ 93 /* The frame this window is on. */
94 Lisp_Object frame; 94 Lisp_Object frame;
95 95
96 /* Following (to right or down) and preceding (to left or up) child 96 /* Following (to right or down) and preceding (to left or up)
97 at same level of tree. */ 97 child at same level of tree. Whether this is left/right or
98 up/down is determined by the 'horizontal' flag, see below.
99 A minibuffer window has the frame's root window pointed by 'prev'. */
98 Lisp_Object next; 100 Lisp_Object next;
99 Lisp_Object prev; 101 Lisp_Object prev;
100 102
101 /* The window this one is a child of. */ 103 /* The window this one is a child of. For a minibuffer window: nil. */
102 Lisp_Object parent; 104 Lisp_Object parent;
103 105
104 /* The normal size of the window. These are fractions, but we do 106 /* The normal size of the window. These are fractions, but we do
@@ -113,7 +115,9 @@ struct window
113 Lisp_Object new_normal; 115 Lisp_Object new_normal;
114 Lisp_Object new_pixel; 116 Lisp_Object new_pixel;
115 117
116 /* May be buffer, window, or nil. */ 118 /* For a leaf window: a buffer; for an internal window: a window;
119 for a pseudo-window (such as menu bar or tool bar): nil. It is
120 a buffer for a minibuffer window as well. */
117 Lisp_Object contents; 121 Lisp_Object contents;
118 122
119 /* A marker pointing to where in the text to start displaying. 123 /* A marker pointing to where in the text to start displaying.