]> git.eshelyaron.com Git - emacs.git/commit
Fix handling of overlays that begin at END in 'overlays_in'
authorMatt Armstrong <matt@rfc20.org>
Fri, 21 Oct 2022 23:07:08 +0000 (16:07 -0700)
committerMatt Armstrong <matt@rfc20.org>
Fri, 21 Oct 2022 23:19:56 +0000 (16:19 -0700)
commita2fde77b5cc15ec5a1c29ca72c97c806204818a9
tree52906f65998c7a9280bdfa41ee7d0fbd59dc1dce
parent37a1145410f7d61883ea689255ee7e564c2fb3d0
Fix handling of overlays that begin at END in 'overlays_in'

When passed EMPTY, 'overlays_in' should return empty overlays at END.
It was doing so, but it was also returning any other overlay that
happened to begin at END.

bug#58672

* src/buffer.c (overlays_in): Don't return overlays at END unless they
are empty overlays.
(disable_line_numbers_overlay_at_eob): Pass 'false' instead of 'NULL'
for the bool 'empty' arg.
* test/src/buffer-tests.el (sorted-overlays-in): New helper function.
(test-overlays-in-empty-range): New test exhaustively covering these
edge conditions.
(test-overlays-in-empty-range-bug58672): Simple test for one case.
src/buffer.c
test/src/buffer-tests.el