diff --git a/src/buffer.c b/src/buffer.c index 252231357bc..db362ffe7b0 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4091,7 +4091,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, } /* Test for intersecting intervals. This does the right thing for both insertion and deletion. */ - if (! insertion || (end_arg > obegin && begin_arg < oend)) + if (end_arg > obegin && begin_arg < oend) { Lisp_Object prop = Foverlay_get (overlay, Qmodification_hooks); if (!NILP (prop)) diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 45914b2b6b0..aa30533c6a0 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el @@ -142,6 +142,7 @@ properties." (expected-calls . ((modification-hooks (nil 3 4)) (modification-hooks (t 3 4 1))))) ((replace . "4")) + ((replace . "4") (overlay-beg . 4)) ;bug#65929 ((replace . "12") (expected-calls . ((modification-hooks (nil 1 3)) (modification-hooks (t 1 2 2)))))