# HG changeset patch # User Richard M. Stallman # Date 1031193382 0 # Node ID ca48173ebf571fe5cb8f9ca7fbd5f43b9ca4120a # Parent 620fccf981d386317f3406c66fe2d56e0086e307 (displayed_window_lines): Correct for one-off bug in HEIGHT on non-window displays. diff -r 620fccf981d3 -r ca48173ebf57 src/window.c --- a/src/window.c Thu Sep 05 02:34:37 2002 +0000 +++ b/src/window.c Thu Sep 05 02:36:22 2002 +0000 @@ -4653,6 +4653,15 @@ move_it_vertically (&it, height); bottom_y = line_bottom_y (&it); + /* rms: On a non-window display, + the value of it.vpos at the bottom of the screen + seems to be 1 larger than window_box_height (w). + This kludge fixes a bug whereby (move-to-window-line -1) + when ZV is on the last screen line + moves to the previous screen line instead of the last one. */ + if (! FRAME_WINDOW_P (XFRAME (w->frame))) + height++; + /* Add in empty lines at the bottom of the window. */ if (bottom_y < height) {