diff options
author | H Durer <h.duerer@gmail.com> | 2018-03-19 15:54:23 +0000 |
---|---|---|
committer | Johnson Denen <johnson.denen@gmail.com> | 2018-08-10 22:20:04 -0400 |
commit | 9f9a6e8c45e329d58a772dcf25942f7093ba5fc0 (patch) | |
tree | e8b3c59f0ec14b110cf93251c95a71b9324b4ad4 /lisp/mastodon-inspect.el | |
parent | df32beb187aa7cc360324a75c802165aba016aeb (diff) |
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.
Diffstat (limited to 'lisp/mastodon-inspect.el')
-rw-r--r-- | lisp/mastodon-inspect.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/mastodon-inspect.el b/lisp/mastodon-inspect.el index 351c92a..61cb1e3 100644 --- a/lisp/mastodon-inspect.el +++ b/lisp/mastodon-inspect.el @@ -75,7 +75,7 @@ (goto-char (point-min)) (while (search-forward "\n\n\n | " nil t) (replace-match "\n | ")) - (mastodon-media--inline-images))) + (mastodon-media--inline-images (point-min) (point-max)))) (switch-to-buffer-other-window buffer) (mastodon-mode))) |