diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-05-02 21:09:28 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-05-02 21:09:28 +0000 |
commit | 55836b737128188e5eb0e362ebb0f436579c39b4 (patch) | |
tree | edbd184fa0d75a6bced171d7cef1868a93f53376 /src | |
parent | d38bb695cc20902ad5942840cbb173465170a31d (diff) | |
download | emacs-55836b737128188e5eb0e362ebb0f436579c39b4.tar.gz emacs-55836b737128188e5eb0e362ebb0f436579c39b4.tar.bz2 emacs-55836b737128188e5eb0e362ebb0f436579c39b4.zip |
(show_mouse_face): Fix test for cursor in highlighted area.
(note_mouse_highlight): Reorder test for simplicity.
Diffstat (limited to 'src')
-rw-r--r-- | src/xterm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c index 303ba7a33d7..32e11dfaee5 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -353,6 +353,7 @@ static void redraw_previous_char (); 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 @@ note_mouse_highlight (f, x, y) 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 @@ note_mouse_highlight (f, x, y) ZV = ozv; current_buffer = obuf; } - else if (pos <= 0) - clear_mouse_face (); } } @@ -2366,7 +2366,7 @@ show_mouse_face (hl) /* 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; |