X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/63efcc268635dea78c6bd80749eae4ee2c72d717..bf5ddded70c11edaf3514b25da27fc71cfb8e965:/src/indent.c diff --git a/src/indent.c b/src/indent.c index d5162e35b5..bc59239f20 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1995,7 +1995,7 @@ whether or not it is currently displayed in some window. */) struct text_pos pt; struct window *w; Lisp_Object old_buffer; - EMACS_INT old_charpos IF_LINT (= 0), old_bytepos IF_LINT (= 0); + EMACS_INT old_charpos UNINIT, old_bytepos UNINIT; Lisp_Object lcols; void *itdata = NULL; @@ -2036,8 +2036,8 @@ whether or not it is currently displayed in some window. */) bool disp_string_at_start_p = 0; ptrdiff_t nlines = XINT (lines); int vpos_init = 0; - double start_col; - int start_x IF_LINT (= 0); + double start_col UNINIT; + int start_x UNINIT; int to_x = -1; bool start_x_given = !NILP (cur_col); @@ -2178,6 +2178,7 @@ whether or not it is currently displayed in some window. */) if (nlines <= 0) { it.vpos = vpos_init; + it.current_y = 0; /* Do this even if LINES is 0, so that we move back to the beginning of the current line as we ought. */ if ((nlines < 0 && IT_CHARPOS (it) > 0) @@ -2187,6 +2188,7 @@ whether or not it is currently displayed in some window. */) else if (overshoot_handled) { it.vpos = vpos_init; + it.current_y = 0; move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); } else @@ -2200,6 +2202,7 @@ whether or not it is currently displayed in some window. */) while (IT_CHARPOS (it) <= it_start) { it.vpos = 0; + it.current_y = 0; move_it_by_lines (&it, 1); } if (nlines > 1) @@ -2208,6 +2211,7 @@ whether or not it is currently displayed in some window. */) else /* it_start = ZV */ { it.vpos = 0; + it.current_y = 0; move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); /* We could have some display or overlay string at ZV, in which case it.vpos will be nonzero now, while