unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58672: 29.0.50; [noverlay] overlays-in returns overlays for empty range
@ 2022-10-21  0:21 Matt Armstrong
  2022-10-21 23:24 ` Matt Armstrong
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Armstrong @ 2022-10-21  0:21 UTC (permalink / raw)
  To: 58672; +Cc: stefan monnier

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-15 17:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  0:21 bug#58672: 29.0.50; [noverlay] overlays-in returns overlays for empty range Matt Armstrong
2022-10-21 23:24 ` Matt Armstrong
2022-10-22  0:06   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-23 15:43     ` Matt Armstrong
2022-11-12 20:57       ` Stefan Kangas
2022-11-15 17:54         ` Matt Armstrong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).