]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor tweaks to the fix for `insert-before-markers' overlay fix
authorMatt Armstrong <matt@rfc20.org>
Fri, 4 Nov 2022 22:24:40 +0000 (15:24 -0700)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Nov 2022 20:45:18 +0000 (16:45 -0400)
(bug#58928)

* src/buffer.c (adjust_overlays_for_insert): wrap to less than 80
chars.
* src/itree.c: document BEFORE_MARKERS.

src/buffer.c
src/itree.c

index 745e62f53f7a61e7cd06f4e4626536316c6a703f..390ccff5c8a724b4ee5fabc80774bcdf37d1df4a 100644 (file)
@@ -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);
     }
 }
 
index c5e43bb028921af9f6f3b87bbf9bc0230e4d364b..989f452cb925292dffcb003576aa48697a47ec40 100644 (file)
@@ -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,