master eba26e9489f: buffer.c: Don't involve the redisplay if the overlay has no proprties

Stefan Monnier via Mailing list for Emacs changes <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit eba26e9489faf8b0716401a27e3b8d60bfa4120a
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>

    buffer.c: Don't involve the redisplay if the overlay has no proprties
    
    * src/buffer.c (drop_overlay, Fmove_overlay): Test overlay's
    plist before calling `modify_overlay`.
---
 src/buffer.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/buffer.c b/src/buffer.c
index bafe86263ae..812c82f43bd 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -980,7 +980,8 @@ drop_overlay (struct Lisp_Overlay *ov)
   if (! ov->buffer)
     return;
 
-  modify_overlay (ov->buffer, overlay_start (ov), overlay_end (ov));
+  if (!NILP (ov->plist))
+    modify_overlay (ov->buffer, overlay_start (ov), overlay_end (ov));
   remove_buffer_overlay (ov->buffer, ov);
 }
 
@@ -3763,7 +3764,9 @@ buffer.  */)
                               n_beg, n_end);
 
   /* If the overlay has changed buffers, do a thorough redisplay.  */
-  if (!BASE_EQ (buffer, obuffer))
+  if (NILP (OVERLAY_PLIST (overlay)))
+    ; /* No props so the overlay doesn't affect the display.  */
+  else if (!BASE_EQ (buffer, obuffer))
     {
       /* Redisplay where the overlay was.  */
       if (ob)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.