diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 020e02cafcf..744259568e4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-02-18 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xdisp.c (get_window_cursor_type, display_and_set_cursor): | ||
| 4 | Fix last change. | ||
| 5 | |||
| 1 | 2004-02-17 Kim F. Storm <storm@cua.dk> | 6 | 2004-02-17 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * xdisp.c (fast_find_position): Fix return value of new version; | 8 | * xdisp.c (fast_find_position): Fix return value of new version; |
diff --git a/src/xdisp.c b/src/xdisp.c index 96d51b27480..246b30549f6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -19028,9 +19028,9 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 19028 | cursor_type = get_specified_cursor_type (b->cursor_type, width); | 19028 | cursor_type = get_specified_cursor_type (b->cursor_type, width); |
| 19029 | 19029 | ||
| 19030 | /* Use normal cursor if not blinked off. */ | 19030 | /* Use normal cursor if not blinked off. */ |
| 19031 | if (!w->cursor_off_p && glyph != NULL) | 19031 | if (!w->cursor_off_p) |
| 19032 | { | 19032 | { |
| 19033 | if (glyph->type == IMAGE_GLYPH) { | 19033 | if (glyph != NULL && glyph->type == IMAGE_GLYPH) { |
| 19034 | if (cursor_type == FILLED_BOX_CURSOR) | 19034 | if (cursor_type == FILLED_BOX_CURSOR) |
| 19035 | cursor_type = HOLLOW_BOX_CURSOR; | 19035 | cursor_type = HOLLOW_BOX_CURSOR; |
| 19036 | } | 19036 | } |
| @@ -19347,7 +19347,6 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 19347 | int new_cursor_type; | 19347 | int new_cursor_type; |
| 19348 | int new_cursor_width; | 19348 | int new_cursor_width; |
| 19349 | int active_cursor; | 19349 | int active_cursor; |
| 19350 | struct glyph_matrix *current_glyphs; | ||
| 19351 | struct glyph_row *glyph_row; | 19350 | struct glyph_row *glyph_row; |
| 19352 | struct glyph *glyph; | 19351 | struct glyph *glyph; |
| 19353 | 19352 | ||
| @@ -19365,11 +19364,7 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 19365 | if (!on && !w->phys_cursor_on_p) | 19364 | if (!on && !w->phys_cursor_on_p) |
| 19366 | return; | 19365 | return; |
| 19367 | 19366 | ||
| 19368 | current_glyphs = w->current_matrix; | 19367 | glyph_row = MATRIX_ROW (w->current_matrix, vpos); |
| 19369 | glyph_row = MATRIX_ROW (current_glyphs, vpos); | ||
| 19370 | glyph = (glyph_row->cursor_in_fringe_p ? NULL | ||
| 19371 | : glyph_row->glyphs[TEXT_AREA] + hpos); | ||
| 19372 | |||
| 19373 | /* If cursor row is not enabled, we don't really know where to | 19368 | /* If cursor row is not enabled, we don't really know where to |
| 19374 | display the cursor. */ | 19369 | display the cursor. */ |
| 19375 | if (!glyph_row->enabled_p) | 19370 | if (!glyph_row->enabled_p) |
| @@ -19378,6 +19373,11 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) | |||
| 19378 | return; | 19373 | return; |
| 19379 | } | 19374 | } |
| 19380 | 19375 | ||
| 19376 | glyph = NULL; | ||
| 19377 | if (!glyph_row->exact_window_width_line_p | ||
| 19378 | || hpos < glyph_row->used[TEXT_AREA]) | ||
| 19379 | glyph = glyph_row->glyphs[TEXT_AREA] + hpos; | ||
| 19380 | |||
| 19381 | xassert (interrupt_input_blocked); | 19381 | xassert (interrupt_input_blocked); |
| 19382 | 19382 | ||
| 19383 | /* Set new_cursor_type to the cursor we want to be displayed. */ | 19383 | /* Set new_cursor_type to the cursor we want to be displayed. */ |