aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorJim Blandy1993-05-28 06:50:23 +0000
committerJim Blandy1993-05-28 06:50:23 +0000
commitc82ed7283a2bcc9264e93dda3b832d6189b4d331 (patch)
tree903e8fb9dc11d60d9bddd6de32714c1ba6ec1355 /src/buffer.c
parent312b93ee500d60acb4d75dd056f5fbd068f6b32a (diff)
downloademacs-c82ed7283a2bcc9264e93dda3b832d6189b4d331.tar.gz
emacs-c82ed7283a2bcc9264e93dda3b832d6189b4d331.zip
* 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.")
1566 1566
1567 b = XBUFFER (buffer); 1567 b = XBUFFER (buffer);
1568 1568
1569 /* Redisplay the area the overlay has just left, or just enclosed. */ 1569 /* If the overlay has changed buffers, do a thorough redisplay. */
1570 { 1570 if (! EQ (buffer, XMARKER (OVERLAY_START (overlay))->buffer))
1571 Lisp_Object o_beg = OVERLAY_START (overlay); 1571 windows_or_buffers_changed = 1;
1572 Lisp_Object o_end = OVERLAY_END (overlay); 1572 else
1573 int change_beg, change_end; 1573 /* Redisplay the area the overlay has just left, or just enclosed. */
1574 1574 {
1575 o_beg = OVERLAY_POSITION (o_beg); 1575 Lisp_Object o_beg = OVERLAY_START (overlay);
1576 o_end = OVERLAY_POSITION (o_end); 1576 Lisp_Object o_end = OVERLAY_END (overlay);
1577 1577 int change_beg, change_end;
1578 if (XINT (o_beg) == XINT (beg)) 1578
1579 redisplay_region (b, XINT (o_end), XINT (end)); 1579 o_beg = OVERLAY_POSITION (o_beg);
1580 else if (XINT (o_end) == XINT (end)) 1580 o_end = OVERLAY_POSITION (o_end);
1581 redisplay_region (b, XINT (o_beg), XINT (beg)); 1581
1582 else 1582 if (XINT (o_beg) == XINT (beg))
1583 { 1583 redisplay_region (b, XINT (o_end), XINT (end));
1584 if (XINT (beg) < XINT (o_beg)) o_beg = beg; 1584 else if (XINT (o_end) == XINT (end))
1585 if (XINT (end) > XINT (o_end)) o_end = end; 1585 redisplay_region (b, XINT (o_beg), XINT (beg));
1586 redisplay_region (b, XINT (o_beg), XINT (o_end)); 1586 else
1587 } 1587 {
1588 } 1588 if (XINT (beg) < XINT (o_beg)) o_beg = beg;
1589 if (XINT (end) > XINT (o_end)) o_end = end;
1590 redisplay_region (b, XINT (o_beg), XINT (o_end));
1591 }
1592 }
1589 1593
1590 b->overlays_before = Fdelq (overlay, b->overlays_before); 1594 b->overlays_before = Fdelq (overlay, b->overlays_before);
1591 b->overlays_after = Fdelq (overlay, b->overlays_after); 1595 b->overlays_after = Fdelq (overlay, b->overlays_after);