diff options
| author | Eli Zaretskii | 2013-02-11 19:32:32 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-02-11 19:32:32 +0200 |
| commit | f5e1b6804dc2307983e4c55d4d6530549ddccbb7 (patch) | |
| tree | 5a039f66ec5117b30bc47dac8811b0f8cb9a3092 | |
| parent | 2f559cd2a194c0f1fcf6ea46ad42ee3bc9b036d4 (diff) | |
| download | emacs-f5e1b6804dc2307983e4c55d4d6530549ddccbb7.tar.gz emacs-f5e1b6804dc2307983e4c55d4d6530549ddccbb7.zip | |
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.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 163f2e164f4..4353b92673b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-02-11 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (move_it_vertically_backward, move_it_by_lines): Don't | ||
| 4 | use the limitation on backwards movement when lines are truncated | ||
| 5 | in the window. (Bug#13675) | ||
| 6 | |||
| 1 | 2013-02-11 Dmitry Antipov <dmantipov@yandex.ru> | 7 | 2013-02-11 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 8 | ||
| 3 | * marker.c (set_marker_internal): If desired position is passed | 9 | * marker.c (set_marker_internal): If desired position is passed |
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) | |||
| 9003 | 9003 | ||
| 9004 | /* Estimate how many newlines we must move back. */ | 9004 | /* Estimate how many newlines we must move back. */ |
| 9005 | nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); | 9005 | nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); |
| 9006 | pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); | 9006 | if (it->line_wrap == TRUNCATE) |
| 9007 | pos_limit = BEGV; | ||
| 9008 | else | ||
| 9009 | pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); | ||
| 9007 | 9010 | ||
| 9008 | /* Set the iterator's position that many lines back. But don't go | 9011 | /* Set the iterator's position that many lines back. But don't go |
| 9009 | back more than NLINES full screen lines -- this wins a day with | 9012 | 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) | |||
| 9253 | /* Go back -DVPOS buffer lines, but no farther than -DVPOS full | 9256 | /* Go back -DVPOS buffer lines, but no farther than -DVPOS full |
| 9254 | screen lines, and reseat the iterator there. */ | 9257 | screen lines, and reseat the iterator there. */ |
| 9255 | start_charpos = IT_CHARPOS (*it); | 9258 | start_charpos = IT_CHARPOS (*it); |
| 9256 | pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); | 9259 | if (it->line_wrap == TRUNCATE) |
| 9260 | pos_limit = BEGV; | ||
| 9261 | else | ||
| 9262 | pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); | ||
| 9257 | for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i) | 9263 | for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i) |
| 9258 | back_to_previous_visible_line_start (it); | 9264 | back_to_previous_visible_line_start (it); |
| 9259 | reseat (it, it->current.pos, 1); | 9265 | reseat (it, it->current.pos, 1); |