aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index a5ce48813b8..1289d18679b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4227,10 +4227,21 @@ displayed_window_lines (w)
4227{ 4227{
4228 struct it it; 4228 struct it it;
4229 struct text_pos start; 4229 struct text_pos start;
4230 int height = window_box_height (w);
4230 4231
4231 SET_TEXT_POS_FROM_MARKER (start, w->start); 4232 SET_TEXT_POS_FROM_MARKER (start, w->start);
4232 start_display (&it, w, start); 4233 start_display (&it, w, start);
4233 move_it_vertically (&it, window_box_height (w)); 4234 move_it_vertically (&it, height);
4235
4236 /* Add in empty lines at the bottom of the window. */
4237 if (it.current_y < height)
4238 {
4239 struct frame *f = XFRAME (w->frame);
4240 int rest = height - it.current_y;
4241 int lines = (rest + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f);
4242 it.vpos += lines;
4243 }
4244
4234 return it.vpos; 4245 return it.vpos;
4235} 4246}
4236 4247