# HG changeset patch # User Andreas Schwab # Date 1053986793 0 # Node ID 2450703a4ef356c991e60c2b84875c4d5a9e90ee # Parent beb851c49c65736538edf9bc44ef31e40cafea96 (try_window_id): Avoid aborting if PT is inside a partially visible line. diff -r beb851c49c65 -r 2450703a4ef3 src/xdisp.c --- a/src/xdisp.c Mon May 26 22:03:17 2003 +0000 +++ b/src/xdisp.c Mon May 26 22:06:33 2003 +0000 @@ -12881,7 +12881,10 @@ the window end again, since its offset from Z hasn't changed. */ r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + delta - && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + delta_bytes) + && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + delta_bytes + /* PT must not be in a partially visible line. */ + && !(PT >= MATRIX_ROW_START_CHARPOS (row) + delta + && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) { /* Adjust positions in the glyph matrix. */ if (delta || delta_bytes) @@ -12926,7 +12929,10 @@ as is, without changing glyph positions since no text has been added/removed in front of the window end. */ r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); - if (TEXT_POS_EQUAL_P (start, r0->start.pos)) + if (TEXT_POS_EQUAL_P (start, r0->start.pos) + /* PT must not be in a partially visible line. */ + && !(PT >= MATRIX_ROW_START_CHARPOS (row) + && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) { /* We have to compute the window end anew since text can have been added/removed after it. */