From: Karl Heuer Date: Fri, 19 May 1995 21:53:18 +0000 (+0000) Subject: (buffer_posn_from_coords): Don't let startp be before BEGV. X-Git-Tag: emacs-19.34~4000 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2ba9ed587c518a772e9925d59c2dc96e05807d6d;p=emacs.git (buffer_posn_from_coords): Don't let startp be before BEGV. --- diff --git a/src/dispnew.c b/src/dispnew.c index 206cdb89661..8f010f7795b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1504,6 +1504,11 @@ buffer_posn_from_coords (window, col, line) 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