Mercurial > emacs
comparison src/xterm.c @ 6649:1305248ee38a
(note_mouse_highlight): Reject out-of-range pos value
before it causes an error.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 03 Apr 1994 08:09:45 +0000 |
parents | 8e2379ce4fcb |
children | cb14d76e993c |
comparison
equal
deleted
inserted
replaced
6648:c7eefaee311c | 6649:1305248ee38a |
---|---|
1968 && pos >= mouse_face_beg && pos < mouse_face_end)) | 1968 && pos >= mouse_face_beg && pos < mouse_face_end)) |
1969 { | 1969 { |
1970 Lisp_Object mouse_face, overlay, position; | 1970 Lisp_Object mouse_face, overlay, position; |
1971 Lisp_Object *overlay_vec; | 1971 Lisp_Object *overlay_vec; |
1972 int len, noverlays, ignor1; | 1972 int len, noverlays, ignor1; |
1973 struct buffer *obuf; | |
1974 | |
1975 /* If we get an out-of-range value, return now; | |
1976 don't get an error. */ | |
1977 if (pos > BUF_ZV (XBUFFER (w->buffer))) | |
1978 return; | |
1973 | 1979 |
1974 /* Make the window's buffer temporarily current for | 1980 /* Make the window's buffer temporarily current for |
1975 overlays_at and compute_char_face. */ | 1981 overlays_at and compute_char_face. */ |
1976 struct buffer *obuf = current_buffer; | 1982 obuf = current_buffer; |
1977 current_buffer = XBUFFER (w->buffer); | 1983 current_buffer = XBUFFER (w->buffer); |
1978 | 1984 |
1979 /* Yes. Clear the display of the old active region, if any. */ | 1985 /* Yes. Clear the display of the old active region, if any. */ |
1980 clear_mouse_face (); | 1986 clear_mouse_face (); |
1981 | 1987 |