From: Matt Armstrong Date: Fri, 4 Nov 2022 22:24:40 +0000 (-0700) Subject: Minor tweaks to the fix for `insert-before-markers' overlay fix X-Git-Tag: emacs-29.0.90~1616^2~274 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=26d2ac38e9a7486aa56acb6bb0162c8ee091aaca;p=emacs.git Minor tweaks to the fix for `insert-before-markers' overlay fix (bug#58928) * src/buffer.c (adjust_overlays_for_insert): wrap to less than 80 chars. * src/itree.c: document BEFORE_MARKERS. --- diff --git a/src/buffer.c b/src/buffer.c index 745e62f53f7..390ccff5c8a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3467,7 +3467,8 @@ adjust_overlays_for_insert (ptrdiff_t pos, ptrdiff_t length, bool before_markers itree_insert_gap (base->overlays, pos, length, before_markers); FOR_EACH_LIVE_BUFFER (tail, other) if (XBUFFER (other)->base_buffer == base) - itree_insert_gap (XBUFFER (other)->overlays, pos, length, before_markers); + itree_insert_gap (XBUFFER (other)->overlays, pos, length, + before_markers); } } diff --git a/src/itree.c b/src/itree.c index c5e43bb0289..989f452cb92 100644 --- a/src/itree.c +++ b/src/itree.c @@ -1191,7 +1191,10 @@ itree_iterator_finish (struct itree_iterator *iter) /* Insert a gap at POS of length LENGTH expanding all intervals intersecting it, while respecting their rear_advance and - front_advance setting. */ + front_advance setting. + + When BEFORE_MARKERS, all overlays beginning/ending at POS are + treated as if their front_advance/rear_advance was true. */ void itree_insert_gap (struct itree_tree *tree,