aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEli Zaretskii2015-08-08 16:55:26 +0300
committerEli Zaretskii2015-08-08 16:55:26 +0300
commit1bb08a8cb10f0b8aa862d93a57edf70591fd135e (patch)
tree35bf796ed208205d57033f08c929a5c9bcf4321d /test
parent7afa4f300b9dc38bf3f33b18fa83bfe35e21a479 (diff)
downloademacs-1bb08a8cb10f0b8aa862d93a57edf70591fd135e.tar.gz
emacs-1bb08a8cb10f0b8aa862d93a57edf70591fd135e.zip
Fix overlay string display regressions introduced in Emacs 24.5
* src/xdisp.c (pop_it): Reset the flag to ignore overlays at this buffer position, if we move the iterator to a new position as result of jumping over text covered by a "replacing" display property. * test/redisplay-testsuite.el (test-redisplay-4): Add 2 new tests.
Diffstat (limited to 'test')
-rw-r--r--test/redisplay-testsuite.el35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/redisplay-testsuite.el b/test/redisplay-testsuite.el
index 40a21b7fea4..a5ec1e89eaf 100644
--- a/test/redisplay-testsuite.el
+++ b/test/redisplay-testsuite.el
@@ -251,6 +251,41 @@ static unsigned char x_bits[] = {0xff, 0x81, 0xbd, 0xa5, 0xa5, 0xbd, 0x81, 0xff
251 (str "ABC")) 251 (str "ABC"))
252 (put-text-property 1 2 'invisible 'test-redisplay--ellipsis-invis str) 252 (put-text-property 1 2 'invisible 'test-redisplay--ellipsis-invis str)
253 (overlay-put ov 'display str))) 253 (overlay-put ov 'display str)))
254 ;; Overlay string over invisible text and non-default face.
255 (insert "\n Expected: ..." (propertize "ABC" 'face 'highlight) "XYZ")
256 (insert "\n Result: ")
257 (insert (propertize "foo" 'invisible 'test-redisplay--ellipsis-invis))
258 (let ((ov (make-overlay (point) (point))))
259 (overlay-put ov 'invisible t)
260 (overlay-put ov 'window (selected-window))
261 (overlay-put ov 'after-string
262 (propertize "ABC" 'face 'highlight)))
263 (insert "XYZ\n")
264 ;; Overlay strings with partial `invisibility' property and with a
265 ;; display property on the before-string.
266 (insert "\n Expected: A...C")
267 (insert "\n Result: ")
268 (let ((opoint (point)))
269 (insert "X\n")
270 (let ((ov (make-overlay opoint (1+ opoint)))
271 (str "ABC"))
272 (put-text-property 1 2 'invisible 'test-redisplay--ellipsis-invis str)
273 (overlay-put ov 'display str)))
274 (insert "\n Expected: ..."
275 (propertize "DEF" 'display '(image :type xpm :file "close.xpm"))
276 (propertize "ABC" 'face 'highlight) "XYZ")
277 (insert "\n Result: ")
278 (insert (propertize "foo" 'invisible 'test-redisplay--ellipsis-invis))
279 (let ((ov (make-overlay (point) (point))))
280 (overlay-put ov 'invisible t)
281 (overlay-put ov 'window (selected-window))
282 (overlay-put ov 'after-string
283 (propertize "ABC" 'face 'highlight))
284 (overlay-put ov 'before-string
285 (propertize "DEF"
286 'display '(image :type xpm :file "close.xpm"))))
287 (insert "XYZ\n")
288
254 ;; Overlay string with 2 adjacent and different invisible 289 ;; Overlay string with 2 adjacent and different invisible
255 ;; properties. This caused an infloop before Emacs 25. 290 ;; properties. This caused an infloop before Emacs 25.
256 (insert "\n Expected: ABC") 291 (insert "\n Expected: ABC")