aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-05-02 21:09:28 +0000
committerKarl Heuer1994-05-02 21:09:28 +0000
commit55836b737128188e5eb0e362ebb0f436579c39b4 (patch)
treeedbd184fa0d75a6bced171d7cef1868a93f53376 /src
parentd38bb695cc20902ad5942840cbb173465170a31d (diff)
downloademacs-55836b737128188e5eb0e362ebb0f436579c39b4.tar.gz
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.c12
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 ();
353static void redraw_following_char (); 353static void redraw_following_char ();
354static unsigned int x_x_to_emacs_modifiers (); 354static unsigned int x_x_to_emacs_modifiers ();
355 355
356static int fast_find_position ();
356static void note_mouse_highlight (); 357static void note_mouse_highlight ();
357static void clear_mouse_face (); 358static void clear_mouse_face ();
358static void show_mouse_face (); 359static void show_mouse_face ();
@@ -2170,9 +2171,10 @@ note_mouse_highlight (f, x, y)
2170 break; 2171 break;
2171 pos = ptr[i]; 2172 pos = ptr[i];
2172 /* Is it outside the displayed active region (if any)? */ 2173 /* Is it outside the displayed active region (if any)? */
2173 if (pos > 0 2174 if (pos <= 0)
2174 && ! (EQ (window, mouse_face_window) 2175 clear_mouse_face ();
2175 && pos >= mouse_face_beg && pos < mouse_face_end)) 2176 else if (! (EQ (window, mouse_face_window)
2177 && pos >= mouse_face_beg && pos < mouse_face_end))
2176 { 2178 {
2177 Lisp_Object mouse_face, overlay, position; 2179 Lisp_Object mouse_face, overlay, position;
2178 Lisp_Object *overlay_vec; 2180 Lisp_Object *overlay_vec;
@@ -2277,8 +2279,6 @@ note_mouse_highlight (f, x, y)
2277 ZV = ozv; 2279 ZV = ozv;
2278 current_buffer = obuf; 2280 current_buffer = obuf;
2279 } 2281 }
2280 else if (pos <= 0)
2281 clear_mouse_face ();
2282 } 2282 }
2283} 2283}
2284 2284
@@ -2366,7 +2366,7 @@ show_mouse_face (hl)
2366 /* If the cursor's in the text we are about to rewrite, 2366 /* If the cursor's in the text we are about to rewrite,
2367 turn the cursor off. */ 2367 turn the cursor off. */
2368 if (i == curs_y 2368 if (i == curs_y
2369 && (curs_x >= begrow - 1 || curs_x <= endrow)) 2369 && (curs_x >= begcol - 1 && curs_x <= endcol))
2370 { 2370 {
2371 x_display_cursor (f, 0); 2371 x_display_cursor (f, 0);
2372 cursor_off = 1; 2372 cursor_off = 1;