aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-09-15 12:06:39 +0000
committerKim F. Storm2005-09-15 12:06:39 +0000
commitad5afd5bf392106e2a21fdc1d8ae2cb134d00ce5 (patch)
tree46a121d840d96212f44abc44e69be3c59fb6e0fe /src
parent0197852162f613bbb71e4af91fb46dbb734028a9 (diff)
downloademacs-ad5afd5bf392106e2a21fdc1d8ae2cb134d00ce5.tar.gz
emacs-ad5afd5bf392106e2a21fdc1d8ae2cb134d00ce5.zip
(move_it_vertically): Don't try to fetch byte BEGV-1.
(reseat_at_next_visible_line_start): Likewise (in xassert).
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 0b34856aa6a..aa81fe7a3db 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4807,7 +4807,8 @@ reseat_at_next_visible_line_start (it, on_newline_p)
4807 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), 4807 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
4808 (double) it->selective)) /* iftc */ 4808 (double) it->selective)) /* iftc */
4809 { 4809 {
4810 xassert (FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); 4810 xassert (IT_BYTEPOS (*it) == BEGV
4811 || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
4811 newline_found_p = forward_to_next_line_start (it, &skipped_p); 4812 newline_found_p = forward_to_next_line_start (it, &skipped_p);
4812 } 4813 }
4813 4814
@@ -6525,6 +6526,7 @@ move_it_vertically (it, dy)
6525 /* If buffer ends in ZV without a newline, move to the start of 6526 /* If buffer ends in ZV without a newline, move to the start of
6526 the line to satisfy the post-condition. */ 6527 the line to satisfy the post-condition. */
6527 if (IT_CHARPOS (*it) == ZV 6528 if (IT_CHARPOS (*it) == ZV
6529 && ZV > BEGV
6528 && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') 6530 && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n')
6529 move_it_by_lines (it, 0, 0); 6531 move_it_by_lines (it, 0, 0);
6530 } 6532 }