diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-02-11 19:32:32 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-02-11 19:32:32 +0200 |
commit | f5e1b6804dc2307983e4c55d4d6530549ddccbb7 (patch) | |
tree | 5a039f66ec5117b30bc47dac8811b0f8cb9a3092 /src/xdisp.c | |
parent | 2f559cd2a194c0f1fcf6ea46ad42ee3bc9b036d4 (diff) | |
download | emacs-f5e1b6804dc2307983e4c55d4d6530549ddccbb7.tar.gz |
Fix previous commit for bug #13675.
src/xdisp.c (move_it_vertically_backward, move_it_by_lines): Don't
use the limitation on backwards movement when lines are truncated
in the window.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 25c09fe40bd..3b82de9432d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9003,7 +9003,10 @@ move_it_vertically_backward (struct it *it, int dy) /* Estimate how many newlines we must move back. */ nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); - pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); + if (it->line_wrap == TRUNCATE) + pos_limit = BEGV; + else + pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); /* Set the iterator's position that many lines back. But don't go back more than NLINES full screen lines -- this wins a day with @@ -9253,7 +9256,10 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) /* Go back -DVPOS buffer lines, but no farther than -DVPOS full screen lines, and reseat the iterator there. */ start_charpos = IT_CHARPOS (*it); - pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); + if (it->line_wrap == TRUNCATE) + pos_limit = BEGV; + else + pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i) back_to_previous_visible_line_start (it); reseat (it, it->current.pos, 1); |