changeset 3204:a3007f83650c

* buffer.c (Fmove_overlay): If the overlay is changing buffers, do a thorough redisplay.
author Jim Blandy <jimb@redhat.com>
date Fri, 28 May 1993 06:50:23 +0000
parents 1055aa1b7547
children 1ec39f8a42ac
files src/buffer.c
diffstat 1 files changed, 23 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Fri May 28 06:44:48 1993 +0000
+++ b/src/buffer.c	Fri May 28 06:50:23 1993 +0000
@@ -1566,26 +1566,30 @@
 
   b = XBUFFER (buffer);
 
-  /* Redisplay the area the overlay has just left, or just enclosed.  */
-  {
-    Lisp_Object o_beg = OVERLAY_START (overlay);
-    Lisp_Object o_end = OVERLAY_END   (overlay);
-    int change_beg, change_end;
-
-    o_beg = OVERLAY_POSITION (o_beg);
-    o_end = OVERLAY_POSITION (o_end);
+  /* If the overlay has changed buffers, do a thorough redisplay.  */
+  if (! EQ (buffer, XMARKER (OVERLAY_START (overlay))->buffer))
+    windows_or_buffers_changed = 1;
+  else
+    /* Redisplay the area the overlay has just left, or just enclosed.  */
+    {
+      Lisp_Object o_beg = OVERLAY_START (overlay);
+      Lisp_Object o_end = OVERLAY_END   (overlay);
+      int change_beg, change_end;
 
-    if (XINT (o_beg) == XINT (beg))
-      redisplay_region (b, XINT (o_end), XINT (end));
-    else if (XINT (o_end) == XINT (end))
-      redisplay_region (b, XINT (o_beg), XINT (beg));
-    else
-      {
-	if (XINT (beg) < XINT (o_beg)) o_beg = beg;
-	if (XINT (end) > XINT (o_end)) o_end = end;
-	redisplay_region (b, XINT (o_beg), XINT (o_end));
-      }
-  }
+      o_beg = OVERLAY_POSITION (o_beg);
+      o_end = OVERLAY_POSITION (o_end);
+
+      if (XINT (o_beg) == XINT (beg))
+	redisplay_region (b, XINT (o_end), XINT (end));
+      else if (XINT (o_end) == XINT (end))
+	redisplay_region (b, XINT (o_beg), XINT (beg));
+      else
+	{
+	  if (XINT (beg) < XINT (o_beg)) o_beg = beg;
+	  if (XINT (end) > XINT (o_end)) o_end = end;
+	  redisplay_region (b, XINT (o_beg), XINT (o_end));
+	}
+    }
 
   b->overlays_before = Fdelq (overlay, b->overlays_before);
   b->overlays_after  = Fdelq (overlay, b->overlays_after);