# HG changeset patch # User Kim F. Storm # Date 1126785999 0 # Node ID 1b029723f4d8e6544ea6d73df71d639ab03614f0 # Parent 8027aefc2d75c5f0ce4506dfcd2a8aff8f072b50 (move_it_vertically): Don't try to fetch byte BEGV-1. (reseat_at_next_visible_line_start): Likewise (in xassert). diff -r 8027aefc2d75 -r 1b029723f4d8 src/xdisp.c --- a/src/xdisp.c Thu Sep 15 12:05:41 2005 +0000 +++ b/src/xdisp.c Thu Sep 15 12:06:39 2005 +0000 @@ -4807,7 +4807,8 @@ && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), (double) it->selective)) /* iftc */ { - xassert (FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); + xassert (IT_BYTEPOS (*it) == BEGV + || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); newline_found_p = forward_to_next_line_start (it, &skipped_p); } @@ -6525,6 +6526,7 @@ /* If buffer ends in ZV without a newline, move to the start of the line to satisfy the post-condition. */ if (IT_CHARPOS (*it) == ZV + && ZV > BEGV && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') move_it_by_lines (it, 0, 0); }