aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/buffer-tests.el
diff options
context:
space:
mode:
authorStephen Berman2026-02-12 18:48:20 +0100
committerStephen Berman2026-02-12 18:48:20 +0100
commitf8a25d00ae45a3362b08a999026835fde85f6ef0 (patch)
treea3ec79441ee6222ae7692effbe914abcad2221b1 /test/src/buffer-tests.el
parentadf6c7bcbe989871b20c794b3f528aa348bc0c60 (diff)
downloademacs-f8a25d00ae45a3362b08a999026835fde85f6ef0.tar.gz
emacs-f8a25d00ae45a3362b08a999026835fde85f6ef0.zip
Make 'overlays_in' use only real EOB (bug#80242)
This restores the original behavior of 'overlays_in'. Changes in this behavior had been made for cases of narrowing, but this resulted in a regression with uses of 'remove-overlays'. * src/buffer.c (overlays_in): Change all occurrences of ZV to Z. * test/src/buffer-tests.el (test-overlays-in-2) (test-remove-overlays): Adjust expected results to accommodate changes in 'overlays_in'.
Diffstat (limited to 'test/src/buffer-tests.el')
-rw-r--r--test/src/buffer-tests.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 5f534ed513a..f4654e90bce 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -1060,7 +1060,9 @@ should evaporate overlays in both."
1060 (should-length 2 (overlays-in 1 (point-max))) 1060 (should-length 2 (overlays-in 1 (point-max)))
1061 (should-length 1 (overlays-in (point-max) (point-max))) 1061 (should-length 1 (overlays-in (point-max) (point-max)))
1062 (narrow-to-region 1 50) 1062 (narrow-to-region 1 50)
1063 (should-length 1 (overlays-in 1 (point-max))) 1063 ;; We only count empty overlays in narrowed buffers excluding the
1064 ;; real EOB when the region is confined to `point-max'.
1065 (should-length 0 (overlays-in 1 (point-max)))
1064 (should-length 1 (overlays-in (point-max) (point-max)))))) 1066 (should-length 1 (overlays-in (point-max) (point-max))))))
1065 1067
1066 1068
@@ -8375,8 +8377,11 @@ dicta sunt, explicabo. "))
8375 (should (= (length (overlays-in 1 2)) 0)) 8377 (should (= (length (overlays-in 1 2)) 0))
8376 (narrow-to-region 1 2) 8378 (narrow-to-region 1 2)
8377 ;; We've now narrowed, so the zero-length overlay is at the end of 8379 ;; We've now narrowed, so the zero-length overlay is at the end of
8378 ;; the (accessible part of the) buffer. 8380 ;; the (accessible part of the) buffer, but we only count it when
8379 (should (= (length (overlays-in 1 2)) 1)) 8381 ;; the region is confined to `point-max'.
8382 (should (= (length (overlays-in 1 2)) 0))
8383 (should (= (length (overlays-in 2 2)) 1))
8384 (should (= (length (overlays-in (point-max) (point-max))) 1))
8380 (remove-overlays) 8385 (remove-overlays)
8381 (should (= (length (overlays-in (point-min) (point-max))) 0)))) 8386 (should (= (length (overlays-in (point-min) (point-max))) 0))))
8382 8387