bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#58672: 29.0.50; [noverlay] overlays-in returns overlays for empty ra


From: Matt Armstrong
Subject: bug#58672: 29.0.50; [noverlay] overlays-in returns overlays for empty range
Date: Thu, 20 Oct 2022 17:21:36 -0700

X-Debbugs-CC: Stefan Monnier <monnier@iro.umontreal.ca>

I found a case where the behavior on the feature/noverlay differs from
mainline.

(ert-deftest overlays-in-empty-range ()
    (with-temp-buffer
      (insert (make-string 10 ?=))
      (make-overlay 5 7 nil nil t)
      (should (equal nil (overlays-in 5 5)))))

On mainline the above test passes.  On noverlay it returns the overlay
and fails.

I found this a randomized diff test harness I hacked up.  I don't know
if any packages will break due to this difference.

The docs for `overlays-in' say this:

> Overlap means that at least one character is contained within the
> overlay and also contained within the specified region.

Since no character can be contained within the region (5 5) I think
mainline has it right here.





reply via email to

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