From 9f9a6e8c45e329d58a772dcf25942f7093ba5fc0 Mon Sep 17 00:00:00 2001 From: H Durer Date: Mon, 19 Mar 2018 15:54:23 +0000 Subject: Give mastodon-media--inline-images a saner interface. (#191) Instead of making it search the whole buffer every time to find images to load, give it a range where this work should be done. We then call this immediately after inserting a single status, notification, ... There should be no big noticible difference - images might load a tiny bit sooner although I doubt you can see that. This should be more efficient on large buffers although Alex didn't notice any problems when testing streamed buffers. We should still do it as it make things easier to understand. I was always worried about these global operations. --- test/mastodon-media-tests.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/mastodon-media-tests.el') diff --git a/test/mastodon-media-tests.el b/test/mastodon-media-tests.el index 7031e90..a586be9 100644 --- a/test/mastodon-media-tests.el +++ b/test/mastodon-media-tests.el @@ -189,7 +189,7 @@ ;; stub for the actual test: (stub mastodon-media--load-image-from-url) - (mastodon-media--inline-images) + (mastodon-media--inline-images (point-min) (point-max)) (should (eq 'loading (get-text-property marker-media-link 'media-state))) (should (eq 'invalid-url (get-text-property marker-media-link-bad-url 'media-state))) -- cgit v1.2.3