From 64edc7770f7fe5d6912c5f950fb998ae255415d3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 1 Oct 2012 22:43:53 -0400 Subject: [PATCH] * src/buffer.c (Fmake_overlay): Fix last change. (fix_start_end_in_overlays): Remove redundant recentering. --- src/ChangeLog | 1 + src/buffer.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 507fe80c8ab..a199a7b12e5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,7 @@ * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening. (Fmake_overlay): Remove redundant tests. + (fix_start_end_in_overlays): Remove redundant recentering. 2012-10-02 Juanma Barranquero diff --git a/src/buffer.c b/src/buffer.c index 6925675fd5a..425d05ca790 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3689,7 +3689,6 @@ fix_start_end_in_overlays (register ptrdiff_t start, register ptrdiff_t end) beforep->next = current_buffer->overlays_before; set_buffer_overlays_before (current_buffer, before_list); } - recenter_overlay_lists (current_buffer, current_buffer->overlay_center); if (afterp) { @@ -3847,13 +3846,13 @@ for the rear of the overlay advance when text is inserted there end = OVERLAY_END (overlay); if (OVERLAY_POSITION (end) < b->overlay_center) { - eassert (b->overlays_after); + eassert (b->overlays_after || (XOVERLAY (overlay)->next == NULL)); XOVERLAY (overlay)->next = b->overlays_after; set_buffer_overlays_after (b, XOVERLAY (overlay)); } else { - eassert (b->overlays_before); + eassert (b->overlays_before || (XOVERLAY (overlay)->next == NULL)); XOVERLAY (overlay)->next = b->overlays_before; set_buffer_overlays_before (b, XOVERLAY (overlay)); } -- 2.39.2