Mercurial > emacs
changeset 7282:2bc4929691e9
(show_mouse_face): Fix test for cursor in highlighted area.
(note_mouse_highlight): Reorder test for simplicity.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 02 May 1994 21:09:28 +0000 |
parents | d14d537ce03c |
children | 3dc9a9e95d32 |
files | src/xterm.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Mon May 02 20:56:25 1994 +0000 +++ b/src/xterm.c Mon May 02 21:09:28 1994 +0000 @@ -353,6 +353,7 @@ static void redraw_following_char (); static unsigned int x_x_to_emacs_modifiers (); +static int fast_find_position (); static void note_mouse_highlight (); static void clear_mouse_face (); static void show_mouse_face (); @@ -2170,9 +2171,10 @@ break; pos = ptr[i]; /* Is it outside the displayed active region (if any)? */ - if (pos > 0 - && ! (EQ (window, mouse_face_window) - && pos >= mouse_face_beg && pos < mouse_face_end)) + if (pos <= 0) + clear_mouse_face (); + else if (! (EQ (window, mouse_face_window) + && pos >= mouse_face_beg && pos < mouse_face_end)) { Lisp_Object mouse_face, overlay, position; Lisp_Object *overlay_vec; @@ -2277,8 +2279,6 @@ ZV = ozv; current_buffer = obuf; } - else if (pos <= 0) - clear_mouse_face (); } } @@ -2366,7 +2366,7 @@ /* If the cursor's in the text we are about to rewrite, turn the cursor off. */ if (i == curs_y - && (curs_x >= begrow - 1 || curs_x <= endrow)) + && (curs_x >= begcol - 1 && curs_x <= endcol)) { x_display_cursor (f, 0); cursor_off = 1;