diff src/dispnew.c @ 11858:343ec791e9be

(buffer_posn_from_coords): Don't let startp be before BEGV.
author Karl Heuer <kwzh@gnu.org>
date Fri, 19 May 1995 21:53:18 +0000
parents b90c2cdd9627
children b1a014bdd22c
line wrap: on
line diff
--- a/src/dispnew.c	Fri May 19 18:57:48 1995 +0000
+++ b/src/dispnew.c	Fri May 19 21:53:18 1995 +0000
@@ -1504,6 +1504,11 @@
 
   current_buffer = XBUFFER (window->buffer);
 
+  /* We can't get a correct result in this case,
+     but at least prevent compute_motion from crashing.  */
+  if (startp < BEGV)
+    startp = BEGV;
+
   /* It would be nice if we could use FRAME_CURRENT_GLYPHS (XFRAME
      (window->frame))->bufp to avoid scanning from the very top of
      the window, but it isn't maintained correctly, and I'm not even