mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-18 10:16:51 +00:00
(note_mouse_highlight): Reject out-of-range pos value
before it causes an error.
This commit is contained in:
parent
839c7dfb06
commit
f8bdb8e6b2
@ -1970,10 +1970,16 @@ note_mouse_highlight (f, x, y)
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user