summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-05-28 06:50:23 +0000
committerJim Blandy <jimb@redhat.com>1993-05-28 06:50:23 +0000
commitc82ed7283a2bcc9264e93dda3b832d6189b4d331 (patch)
tree903e8fb9dc11d60d9bddd6de32714c1ba6ec1355 /src/buffer.c
parent312b93ee500d60acb4d75dd056f5fbd068f6b32a (diff)
downloademacs-c82ed7283a2bcc9264e93dda3b832d6189b4d331.tar.gz
* buffer.c (Fmove_overlay): If the overlay is changing buffers,
do a thorough redisplay.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/buffer.c b/src/buffer.c
index b50e7d0f1b0..551898163f1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1566,26 +1566,30 @@ buffer.")
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 (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));
- }
- }
+ /* 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;
+
+ 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);