# HG changeset patch # User Kim F. Storm # Date 1077138110 0 # Node ID 4dcd34f2c3a75608f2b8de2f446b3fd592b66a86 # Parent b8f2a214f98fbb1efbae021f40d747bd6cc5cc00 (get_window_cursor_type, display_and_set_cursor): Fix last change. diff -r b8f2a214f98f -r 4dcd34f2c3a7 src/xdisp.c --- a/src/xdisp.c Wed Feb 18 21:00:59 2004 +0000 +++ b/src/xdisp.c Wed Feb 18 21:01:50 2004 +0000 @@ -19029,9 +19029,9 @@ cursor_type = get_specified_cursor_type (b->cursor_type, width); /* Use normal cursor if not blinked off. */ - if (!w->cursor_off_p && glyph != NULL) - { - if (glyph->type == IMAGE_GLYPH) { + if (!w->cursor_off_p) + { + if (glyph != NULL && glyph->type == IMAGE_GLYPH) { if (cursor_type == FILLED_BOX_CURSOR) cursor_type = HOLLOW_BOX_CURSOR; } @@ -19348,7 +19348,6 @@ int new_cursor_type; int new_cursor_width; int active_cursor; - struct glyph_matrix *current_glyphs; struct glyph_row *glyph_row; struct glyph *glyph; @@ -19366,11 +19365,7 @@ if (!on && !w->phys_cursor_on_p) return; - current_glyphs = w->current_matrix; - glyph_row = MATRIX_ROW (current_glyphs, vpos); - glyph = (glyph_row->cursor_in_fringe_p ? NULL - : glyph_row->glyphs[TEXT_AREA] + hpos); - + glyph_row = MATRIX_ROW (w->current_matrix, vpos); /* If cursor row is not enabled, we don't really know where to display the cursor. */ if (!glyph_row->enabled_p) @@ -19379,6 +19374,11 @@ return; } + glyph = NULL; + if (!glyph_row->exact_window_width_line_p + || hpos < glyph_row->used[TEXT_AREA]) + glyph = glyph_row->glyphs[TEXT_AREA] + hpos; + xassert (interrupt_input_blocked); /* Set new_cursor_type to the cursor we want to be displayed. */