aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-05-19 21:53:18 +0000
committerKarl Heuer1995-05-19 21:53:18 +0000
commit2ba9ed587c518a772e9925d59c2dc96e05807d6d (patch)
tree98ef06d7e0964687a691fbfb7124c6d153eee7b6
parent330e9e11c7d43ad60d58281eba314eded402a496 (diff)
downloademacs-2ba9ed587c518a772e9925d59c2dc96e05807d6d.tar.gz
emacs-2ba9ed587c518a772e9925d59c2dc96e05807d6d.zip
(buffer_posn_from_coords): Don't let startp be before BEGV.
-rw-r--r--src/dispnew.c5
1 files changed, 5 insertions, 0 deletions
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)
1504 1504
1505 current_buffer = XBUFFER (window->buffer); 1505 current_buffer = XBUFFER (window->buffer);
1506 1506
1507 /* We can't get a correct result in this case,
1508 but at least prevent compute_motion from crashing. */
1509 if (startp < BEGV)
1510 startp = BEGV;
1511
1507 /* It would be nice if we could use FRAME_CURRENT_GLYPHS (XFRAME 1512 /* It would be nice if we could use FRAME_CURRENT_GLYPHS (XFRAME
1508 (window->frame))->bufp to avoid scanning from the very top of 1513 (window->frame))->bufp to avoid scanning from the very top of
1509 the window, but it isn't maintained correctly, and I'm not even 1514 the window, but it isn't maintained correctly, and I'm not even