Mercurial > emacs
comparison src/xdisp.c @ 38800:9c6ef0fd5c4d
(move_it_by_lines) <DVPOS < 0>: If not already on
a line start, move back to the line start.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 13 Aug 2001 12:14:15 +0000 |
parents | 4800b18d484f |
children | 633ee3b8d9f3 |
comparison
equal
deleted
inserted
replaced
38799:d4a3eb49c20c | 38800:9c6ef0fd5c4d |
---|---|
5475 else | 5475 else |
5476 { | 5476 { |
5477 struct it it2; | 5477 struct it it2; |
5478 int start_charpos, i; | 5478 int start_charpos, i; |
5479 | 5479 |
5480 /* If we start in the middle of a line, move to the beginning | |
5481 of that line first. */ | |
5482 if (IT_CHARPOS (*it) > BEGV | |
5483 && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') | |
5484 back_to_previous_visible_line_start (it); | |
5485 | |
5480 /* Go back -DVPOS visible lines and reseat the iterator there. */ | 5486 /* Go back -DVPOS visible lines and reseat the iterator there. */ |
5481 start_charpos = IT_CHARPOS (*it); | 5487 start_charpos = IT_CHARPOS (*it); |
5482 for (i = -dvpos; i && IT_CHARPOS (*it) > BEGV; --i) | 5488 for (i = -dvpos; i && IT_CHARPOS (*it) > BEGV; --i) |
5483 back_to_previous_visible_line_start (it); | 5489 back_to_previous_visible_line_start (it); |
5484 reseat (it, it->current.pos, 1); | 5490 reseat (it, it->current.pos, 1); |