emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 26d2ac38e9 2/2: Minor tweaks to the fix for `insert-before-marker


From: Stefan Monnier
Subject: master 26d2ac38e9 2/2: Minor tweaks to the fix for `insert-before-markers' overlay fix
Date: Sat, 5 Nov 2022 16:47:41 -0400 (EDT)

branch: master
commit 26d2ac38e9a7486aa56acb6bb0162c8ee091aaca
Author: Matt Armstrong <matt@rfc20.org>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    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.
---
 src/buffer.c | 3 ++-
 src/itree.c  | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/buffer.c b/src/buffer.c
index 745e62f53f..390ccff5c8 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 c5e43bb028..989f452cb9 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,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]