summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Armstrong <matt@rfc20.org>2022-11-04 15:24:40 -0700
committerStefan Monnier <monnier@iro.umontreal.ca>2022-11-05 16:45:18 -0400
commit26d2ac38e9a7486aa56acb6bb0162c8ee091aaca (patch)
tree9a5f6a6c19b54e29b950c40a2836ca011a68c3f8
parent2fc6e715a2931523a52d541d5b9868ca6cb144ff (diff)
downloademacs-26d2ac38e9a7486aa56acb6bb0162c8ee091aaca.tar.gz
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.
-rw-r--r--src/buffer.c3
-rw-r--r--src/itree.c5
2 files changed, 6 insertions, 2 deletions
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,