aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Griffith <griffitaj@gmail.com>2017-04-24 00:31:02 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-24 12:44:25 -0400
commit16726abaa9f006b8826dd5c0e1630b39859c996f (patch)
tree235143b9d4d94131f7d8d94ae09636de7ca7f86b
parentbb8efbe3b06c1208a2d32d21120e0e64de9d4735 (diff)
Fixed #65 pointer placement when getting more toots
-rw-r--r--lisp/mastodon-tl.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 691f83d..0fced8c 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -224,14 +224,17 @@ Move forward (down) the timeline unless BACKWARD is non-nil."
(defun mastodon-tl--more ()
"Append older toots to timeline."
(interactive)
- (let* ((tl (mastodon-tl--timeline-name))
+ (let* ((point-before-update (point))
+ (tl (mastodon-tl--timeline-name))
(id (mastodon-tl--oldest-id))
(json (mastodon-tl--more-json tl id)))
(when json
(with-current-buffer (current-buffer)
(let ((inhibit-read-only t))
(goto-char (point-max))
- (mastodon-tl--timeline json))))))
+ (mastodon-tl--timeline json)
+ (goto-char point-before-update)
+ (mastodon-tl--goto-next-toot))))))
(defun mastodon-tl--update ()
"Update timeline with new toots."