diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2016-07-02 15:39:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2016-07-02 15:39:26 +0300 |
| commit | 3a1e3b41a545ffc438b2e5c69982ff82e64b747c (patch) | |
| tree | 665f5bd5e5437e2085184deac4894941a2fa57e7 /src/indent.c | |
| parent | 55d38fc89f5aeb9a73c9a8e13914fbb8a9a6a1af (diff) | |
| download | emacs-3a1e3b41a545ffc438b2e5c69982ff82e64b747c.tar.gz | |
Fix vertical-movement in buffers with wrap-prefix
* src/indent.c (Fvertical_motion): Zero the current_y coordinate
whenever we zero the vpos vertical position of the iterator.
* src/xdisp.c (move_it_in_display_line_to): Handle line-prefix and
wrap-prefix regardless of whether the current Y coordinate is
inside the window dimensions. (Bug#23879)
Diffstat (limited to 'src/indent.c')
| -rw-r--r-- | src/indent.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/indent.c b/src/indent.c index 5d7c6ae4f98..bc59239f20f 100644 --- a/src/indent.c +++ b/src/indent.c @@ -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 |
