]> git.eshelyaron.com Git - emacs.git/commit
Fix a narrow-to-region vs. overlays-at bug
authorMatt Armstrong <matt@rfc20.org>
Sat, 22 Oct 2022 02:45:13 +0000 (19:45 -0700)
committerMatt Armstrong <matt@rfc20.org>
Sat, 22 Oct 2022 02:58:34 +0000 (19:58 -0700)
commitf2a51774a934f29848c5796b46faa5e3b022c401
tree2205718ca742e3bba9790ace881373a3d540d3d2
parenta2fde77b5cc15ec5a1c29ca72c97c806204818a9
Fix a narrow-to-region vs. overlays-at bug

See bug#58703.

* src/buffer.c (overlays_in): Add a new TRAILING arg expressing the
behavior wanted by `overlays-at', namely to include all overlays
beginning at the POS passed to `overlays-at', even if POS is the end
of the narrowed region.  Pass true and the search range is extended to
ZV+1 if END is greater than ZV, just as is done for EMPTY.
(overlays_at): Pass 'true' for the new trailing arg.  At present this
is the only caller passing 'true'.
(mouse_face_overlay_overlaps): Pass 'false' for the new trailing arg.
(disable_line_numbers_overlay_at_eob): ditto.
(Foverlays_in): ditto.
* src/editfns.c (overlays_around): ditto.
* test/src/buffer-tests.el (sorted-overlays): Add a spot test for
this.
src/buffer.c
src/buffer.h
src/editfns.c
test/src/buffer-tests.el