Mercurial > emacs
changeset 79619:f92febffffdd
(phys_cursor_in_rect_p): Check if cursor is in fringe area.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Mon, 24 Dec 2007 03:01:15 +0000 |
parents | 589a31597086 |
children | f781613d76ed |
files | src/xdisp.c |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Sun Dec 23 19:13:48 2007 +0000 +++ b/src/xdisp.c Mon Dec 24 03:01:15 2007 +0000 @@ -23481,6 +23481,24 @@ { XRectangle cr, result; struct glyph *cursor_glyph; + struct glyph_row *row; + + if (w->phys_cursor.vpos >= 0 + && w->phys_cursor.vpos < w->current_matrix->nrows + && (row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos), + row->enabled_p) + && row->cursor_in_fringe_p) + { + /* Cursor is in the fringe. */ + cr.x = window_box_right_offset (w, + (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) + ? RIGHT_MARGIN_AREA + : TEXT_AREA)); + cr.y = row->y; + cr.width = WINDOW_RIGHT_FRINGE_WIDTH (w); + cr.height = row->height; + return x_intersect_rectangles (&cr, r, &result); + } cursor_glyph = get_phys_cursor_glyph (w); if (cursor_glyph)