Mercurial > emacs
changeset 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 | c7eefaee311c |
children | a406a09cb770 |
files | src/xterm.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Sun Apr 03 08:09:11 1994 +0000 +++ b/src/xterm.c Sun Apr 03 08:09:45 1994 +0000 @@ -1970,10 +1970,16 @@ Lisp_Object mouse_face, overlay, position; Lisp_Object *overlay_vec; int len, noverlays, ignor1; + struct buffer *obuf; + + /* If we get an out-of-range value, return now; + don't get an error. */ + if (pos > BUF_ZV (XBUFFER (w->buffer))) + return; /* Make the window's buffer temporarily current for overlays_at and compute_char_face. */ - struct buffer *obuf = current_buffer; + obuf = current_buffer; current_buffer = XBUFFER (w->buffer); /* Yes. Clear the display of the old active region, if any. */