Mercurial > emacs
changeset 51253:2450703a4ef3
(try_window_id): Avoid aborting if PT is inside a
partially visible line.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Mon, 26 May 2003 22:06:33 +0000 |
parents | beb851c49c65 |
children | 578995d8b658 |
files | src/xdisp.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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. */