aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/window.c b/src/window.c
index 99a0709d627..e123b89aae3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2910,9 +2910,11 @@ window-start value is reasonable when this function is called. */)
2910{ 2910{
2911 struct window *w, *r, *s; 2911 struct window *w, *r, *s;
2912 struct frame *f; 2912 struct frame *f;
2913 Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; 2913 Lisp_Object sibling, pwindow, delta;
2914 ptrdiff_t startpos IF_LINT (= 0), startbyte IF_LINT (= 0); 2914 Lisp_Object swindow UNINIT;
2915 int top IF_LINT (= 0), new_top; 2915 ptrdiff_t startpos UNINIT, startbyte UNINIT;
2916 int top UNINIT;
2917 int new_top;
2916 bool resize_failed = false; 2918 bool resize_failed = false;
2917 2919
2918 w = decode_valid_window (window); 2920 w = decode_valid_window (window);
@@ -5649,21 +5651,14 @@ displayed_window_lines (struct window *w)
5649 bottom_y = line_bottom_y (&it); 5651 bottom_y = line_bottom_y (&it);
5650 bidi_unshelve_cache (itdata, false); 5652 bidi_unshelve_cache (itdata, false);
5651 5653
5652 /* rms: On a non-window display,
5653 the value of it.vpos at the bottom of the screen
5654 seems to be 1 larger than window_box_height (w).
5655 This kludge fixes a bug whereby (move-to-window-line -1)
5656 when ZV is on the last screen line
5657 moves to the previous screen line instead of the last one. */
5658 if (! FRAME_WINDOW_P (XFRAME (w->frame)))
5659 height++;
5660
5661 /* Add in empty lines at the bottom of the window. */ 5654 /* Add in empty lines at the bottom of the window. */
5662 if (bottom_y < height) 5655 if (bottom_y < height)
5663 { 5656 {
5664 int uy = FRAME_LINE_HEIGHT (it.f); 5657 int uy = FRAME_LINE_HEIGHT (it.f);
5665 it.vpos += (height - bottom_y + uy - 1) / uy; 5658 it.vpos += (height - bottom_y + uy - 1) / uy;
5666 } 5659 }
5660 else if (bottom_y == height)
5661 it.vpos++;
5667 5662
5668 if (old_buffer) 5663 if (old_buffer)
5669 set_buffer_internal (old_buffer); 5664 set_buffer_internal (old_buffer);
@@ -5938,7 +5933,12 @@ DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line,
5938 doc: /* Position point relative to window. 5933 doc: /* Position point relative to window.
5939ARG nil means position point at center of window. 5934ARG nil means position point at center of window.
5940Else, ARG specifies vertical position within the window; 5935Else, ARG specifies vertical position within the window;
5941zero means top of window, negative means relative to bottom of window. */) 5936zero means top of window, negative means relative to bottom
5937of window, -1 meaning the last fully visible display line
5938of the window.
5939
5940Value is the screen line of the window point moved to, counting
5941from the top of the window. */)
5942 (Lisp_Object arg) 5942 (Lisp_Object arg)
5943{ 5943{
5944 struct window *w = XWINDOW (selected_window); 5944 struct window *w = XWINDOW (selected_window);