aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Armstrong2022-11-04 15:24:40 -0700
committerStefan Monnier2022-11-05 16:45:18 -0400
commit26d2ac38e9a7486aa56acb6bb0162c8ee091aaca (patch)
tree9a5f6a6c19b54e29b950c40a2836ca011a68c3f8 /src
parent2fc6e715a2931523a52d541d5b9868ca6cb144ff (diff)
downloademacs-26d2ac38e9a7486aa56acb6bb0162c8ee091aaca.tar.gz
emacs-26d2ac38e9a7486aa56acb6bb0162c8ee091aaca.zip
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.
Diffstat (limited to 'src')
-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
3467 itree_insert_gap (base->overlays, pos, length, before_markers); 3467 itree_insert_gap (base->overlays, pos, length, before_markers);
3468 FOR_EACH_LIVE_BUFFER (tail, other) 3468 FOR_EACH_LIVE_BUFFER (tail, other)
3469 if (XBUFFER (other)->base_buffer == base) 3469 if (XBUFFER (other)->base_buffer == base)
3470 itree_insert_gap (XBUFFER (other)->overlays, pos, length, before_markers); 3470 itree_insert_gap (XBUFFER (other)->overlays, pos, length,
3471 before_markers);
3471 } 3472 }
3472} 3473}
3473 3474
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)
1191 1191
1192/* Insert a gap at POS of length LENGTH expanding all intervals 1192/* Insert a gap at POS of length LENGTH expanding all intervals
1193 intersecting it, while respecting their rear_advance and 1193 intersecting it, while respecting their rear_advance and
1194 front_advance setting. */ 1194 front_advance setting.
1195
1196 When BEFORE_MARKERS, all overlays beginning/ending at POS are
1197 treated as if their front_advance/rear_advance was true. */
1195 1198
1196void 1199void
1197itree_insert_gap (struct itree_tree *tree, 1200itree_insert_gap (struct itree_tree *tree,