From: Andreas Schwab Date: Mon, 26 May 2003 22:07:32 +0000 (+0000) Subject: (try_window_id): Avoid aborting if PT is inside a X-Git-Tag: ttn-vms-21-2-B4~9927 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2d031b89dcc51e3aab3f08495e7c5682af34505d;p=emacs.git (try_window_id): Avoid aborting if PT is inside a partially visible line. --- diff --git a/src/ChangeLog b/src/ChangeLog index 94742480e9b..5d6838ae845 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2003-05-27 Andreas Schwab + + * xdisp.c (try_window_id): Avoid aborting if PT is inside a + partially visible line. + + * alloc.c (Fgarbage_collect): Fix last change. + 2003-05-26 John Paul Wallington * xfns.c (Fx_create_frame): Don't call Qface_set_after_frame_default. diff --git a/src/xdisp.c b/src/xdisp.c index d78c25c5ba9..038d0694bca 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12881,7 +12881,10 @@ try_window_id (w) 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 @@ try_window_id (w) 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. */