Mercurial > emacs
changeset 58401:972f6be01006
(erase_phys_cursor): Clear hollow cursor inside TEXT_AREA.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 21 Nov 2004 15:47:55 +0000 |
parents | dc2e2d79f580 |
children | d1d4d5846215 |
files | src/xdisp.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Sun Nov 21 15:47:22 2004 +0000 +++ b/src/xdisp.c Sun Nov 21 15:47:55 2004 +0000 @@ -20120,6 +20120,7 @@ { int x, y; int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); + int width; cursor_glyph = get_phys_cursor_glyph (w); if (cursor_glyph == NULL) @@ -20127,9 +20128,10 @@ x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); y = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, cursor_row->y)); - - rif->clear_frame_area (f, x, y, - cursor_glyph->pixel_width, cursor_row->visible_height); + width = min (cursor_glyph->pixel_width, + window_box_width (w, TEXT_AREA) - w->phys_cursor.x); + + rif->clear_frame_area (f, x, y, width, cursor_row->visible_height); } /* Erase the cursor by redrawing the character underneath it. */